Many people use medical marijuana on a regular basis, however every marijuana strain and individual are not built the same. Strain Brain was built with medical marijuana patients in mind, in an effort to simplify the process of finding the right strain for the right individual.
The following instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Download and install Node.js, if not already installed on your local machine.
- Install React with the following terminal command:
npm install --save react
- Install
ReactDOM
with the following terminal command:
npm install --save react-dom
- Install
React Bootstrap
with the following terminal command:
npm install react-bootstrap bootstrap
- Install
json-server
with the following terminal command:
npm install -g json-server
-
Get an API key for The Strain API. Do NOT share this API key with anyone else.
-
Clone my repository to your local machine.
-
Navigate to the project folder. In the
src
directory, you will see a file named.Settings.js
(note the dot at the beginning). -
Copy that file with
cp .Settings.js Settings.js
. TheSettings.js
file is already in the.gitignore file
, so it won't ever be tracked by git. This will prevent you from accidentally sharing your API key with other people. -
Copy the API key that you registered into it's appropriate place in the
Settings.js
file.
A step by step series of examples that tell you how to get a development env running
- In your terminal, navigate to the project directory.
Example:
cd /Users/travis/workspace/strain-brain
- From the root of this directory, run the following terminal command in order to start up
React
.
npm start
- Open a new terminal tab and navigate to the
api
directory.
Example:
cd /Users/travis/workspace/strain-brain/src/components/api
- Run the following terminal command in order to start up your
json-server
.
Example:
json-server -p 8088 -w database.json
-
Open your web browser of choice and navigate to
http://localhost:3000/
-
You will be presented with a login/registration page if this is your first time using the application. Register an account (NOTE: USE DUMMY DATA! Do NOT use your real email or password).
-
From this point on, the web application itself has "Toggle Help" options, but for the sake of clarity I'll include the correct flow of usage. As a new user, you will first want to navigate to the
Conditions
tab. From there, you will be able to select different medical conditions to set up your profile. These medical conditions are used to generate a list of recommended strains which can help the patient with the conditions that they have. After setting your conditions, navigate backHome
to view your customized results. The home screen will now have strain recommendations for you to try. If you enjoy a particular cannabis strain, you can add it to yourPuff
list. If you dislike a particular cannabis strain, you can add it to yourPass
list. Photos of this workflow will be provided below. -
Enjoy!
- React - A JavaScript library for building user interfaces
- React Bootstrap - The most popular front-end framework Rebuilt for React.
- The Strain API - The most popular front-end framework Rebuilt for React.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
I use Git for version control.
- Travis Stevenson - Original Creator - TheTechTravis
As of thus far, this project has been planned, developed, and tested exclusively by myself, though I cannot guarantee that I won't receive contributions in the future, so I will provide a list of all contributors to be completely transparent.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Thank you to the creator of The Strain API, which I used to get information for each cannabis strain. My application could not exist without the data provided by that external API.