This API will serve the DSCP Partner Portal. This member managment application is being built for the Downtown St. Charles Partnership (DSCP), a non-profit organization focused on the economic viability of downtown St. Charles, IL.
The purpose of this project is to provide the DSCP with an internal application to manage their contacts and Partners (members). It will also allow them to create groups or committees to which they can add and remove contacts from.
Want to contribute to the project? Check out our contributing docs!
Before you can get started, you need to have the project files on your local machine. Assuming you have git already installed, simply clone this repo and cd into it using the terminal.
$ git clone https://github.com/commitshappen/dscp-partner-portal-api.git
$ cd dscp-partner-portal-api
This database uses postgreSQL. You will therefore need to have it installed and running on your local machine. (The pg gem accesses the postgreSQL database.) AgileVentures has a solid resource on how to do just that.
Download all of the gems to make sure your clone works like it's supposed to.
$ bundle install
Get the database setup and seed it with some contacts and a user.
$ bundle exec rails db:setup
This project uses rspec for unit/integration tests and cucumber for acceptance tests.
$ bundle exec rails spec
$ bundle exec rails cucumber
It's good practice to get the api going on a different port that the default. That way you can run both the server and client simultaneously without any issues. I arbitrarily chose port 3200, which is the port you will need to use if you're trying to work with the front and back ends simultaneously on your local machine.
$ bundle exec rails s -p 3200
Since all of the routes are authenticated, you'll want to first "login" so you can make subsequent requests for information. This is done by sending a POST request to the login path ('/login') with correct user credentials. A test user has been setup for things like this with an email of: "[email protected]" and a password of "ironman". Let's get started.
For details about the (desired) API endpoints, please checkout the API Documentation.