Sweet Spot is a marketplace for pastry chefs and small bakeries and restaurants to share their baked goods with their community. It was made to bring communities together and to highlight smaller businesses.
This was my final project at Flatiron School and is a combination of Rails, React, Redux, Thunk, JWT, and the Stripe API.
This repository contains the database and backend structure necessary to correctly run the entire Sweet Spot project.
- Ruby on Rails web server using Rails
- JSON Web Token authentication using JWT gem
- Serialization using active_model_serializers gem
- Configuration of environment variables using dotenv gem
- Create a clone of this repo using GitHub's repository cloning functionality
- Locate the folder in your system and follow the steps below to run the server
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of Ruby on Rails -
Rails 6.0.2.1
- You have also cloned the frontend portion.
- In order to run this project you will need to create a Stripe account - sign up
This application should come with sample data of pastry products available to purchase. Before we begin, we need to collect all the config values we need to run the application:
Config Value | Description |
---|---|
Secret Key | Your primary Stripe account identifier - find this in the Dashboard. |
After the above requirements have been met:
- Clone this repository and
cd
into it
git clone https://github.com/mwong068/sweet-spot-back-end.git
cd sweet-spot-back-end
- Install dependencies
bundle install
- Set your environment variables
Follow the guide at dotenv for Rails.
Create a .env file at the root of the project directory
touch .env
Correctly set up the .env file following the format below:
STRIPE_SECRET_KEY=(place key here without parentheses)
See Stripe Account Settings to locate the necessary environment variables.
- Set up the database
rails db:create
rails db:migrate
rails db:seed
This will be loaded with starter data so you can see an example of the application functionality.
- Run the application
rails server
- Navigate to http://localhost:3000
After the server is running, you will need to start the frontend portion to see the full application.
Please let me know if you have any trouble getting this to correctly work.
If you want to contact me you can reach me at mwong068@gmail.com
You can also check out my personal portfolio at www.megan-wong.com
No warranty expressed or implied. Software is as is.