Myco Matrix: An application where members can register for field trips, connect with others and access resources for safe foraging. Field trip is an automated lottery which chooses participants and sends emails based on status.
GPL-3.0 License
Myco Matrix is an application where users can register for field trip lotteries, connect with other members and access resources to ensure their foraging experience is safe and permitted.
The Myco Matrix allows users to register, sign in, and edit their profile information. They can register for upcoming field trips with one button click and access resources such as packing lists and permits needed by location (in the Pacific Northwest). Administrators and users within the Coordinator and Leader groups can create, edit and delete field trips as well as manually run the lottery with one button click. The lottery randomizes registrants and assigns them their trip status (accepted, waitlisted, rejected). The automated lottery function emails the registrants their status once the lottery is complete and emails the trip leader the group's contact information. Stretch goals include incorporating the existing mushroom information in the database to attach mushrooms seen on field trips and have that data visible, as well as a fully functional comment thread on each field trip, for users to connect with other users. (See other stretch goals at bottom of Readme).
This project was inspired by my years spent as the volunteer field trip coordinator for the Oregon Mycological Society. I have a strong desire to streamline and automate the process while freeing up volunteer time for other efforts. My long-term goal is to integrate this project into their website to be used for future field trips and provide archival knowledge and encourage more member connection and community.
POST /trips/10/register HTTP/1.1" 400
Once a user registers for a trip, the page disables the register button and lets then know they have registered for the trip. If they navigate away from the page and back, it is the same. If they refresh the page /trips/{id} right after they register, they are offered the registration button again and can sign up for the trip. I have error handling in the api endpoint that won't allow the user to register twice and in react, an error message has been created to address this error. (if the user leaves the page and comes back, it is functional.)Please report any issues or bugs
To view or edit the code, you will need a code editor or text editor. The open-source code editor we used is VisualStudio Code.
(Optional) Download and install VS Code RestClient extension
(Optional) Download and install [Postman] to test API calls(https://www.postman.com/downloads/).
I highly recommend you download this package manager to install software.
In terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
In terminal:
$ brew install python@3
(Note: pip is included with Python-it is the standard package manager for Python)
I used PostgreSQL database for this project and pgAdmin as my graphical interface. You are welcome to use the SQLite database that comes built into Django, but it is not as scalable as an option for a database.
If you use a database other than PostgreSQL, you will need to update the database settings in settings.py
$ brew install postgresql
$ brew services start postgresql
or $ brew services run postgresql
to have it not restart at boot time`$ psql postgres
brew install --cask pgadmin4
You will need your own API key if you want to have the weather report functionality that is present on the TripDetails page.
Go to https://openweathermap.org/api
, register for an API key and put it in the .env file you will create later on.
Fork
button and you will be taken to a new page where you can give your repository a new name and description. Choose "create fork".Code
button and copy the url for HTTPS.$ git clone https://github.com/kimmykokonut/Capstone
.cd Capstone
to enter into the project directory.$ code .
to open the project in VS Code.client
directory$ npm install
to compile the application's code and install all needed dependencies.$ npm run dev
api
directory.$ python3 -m venv .venv
$ . .venv/bin/activate
$ pip install -r requirements.txt
$ python manage.py runserver
$ . deactivate
SECRET_KEY = '{YOUR-KEY}'
DB_USER='{YOUR-USER-NAME}'
DB_PASSWORD='{YOUR-DATABASE-PASSWORD}'
EMAIL_HOST='smtp.gmail.com'
EMAIL_PORT=587
EMAIL_HOST_USER='{YOUR-SENDER-EMAIL}'
EMAIL_HOST_PASSWORD='{YOUR-SENDER-PASSWORD}'
VITE_WEATHER_API={YOUR-API-KEY}
Django has built in migrations that make it easy to update database changes.
$ psql postgres
postgres=# CREATE DATABASE <your_database_name>
$ python manage.py makemigrations
$ python manage.py migrate
If you have any feedback or concerns, Report Bug Request Feature
GNU General Public License v3.0, See license.md for more information
Thank you to the Oregon Mycological Society, a volunteer based nonprofit group in Portland Oregon that I am proud to be a member of. I am grateful for the community I am part of with them.