Rails Engine is a backend application providing fully tested API endpoints that powers a fictitious E-commerce application.
Explore the docs »
·
Report Bug
·
Request Feature
Rails Engine is a backend application providing fully tested API endpoints that powers a fictitious E-commerce application. Merchants have full CRUD functionality for their inventory, including business intelligence endpoints such as finding merchants with the most revenue, merchants with most items sold, revenue across a date range, and the total revenue for a single merchant.
This application exposes 20 RESTful endpoints. The statistical data provided through the business intelligence endpoints were calculated by analyzing over 4000 records of data. Rails Engine is backed by a PostgreSQL database, using ActiveRecord for an ORM as well as Fast_jsonapi for serialization.
To use Rails Engine locally, you can fork or clone this repo.
git clone git@github.com:Jonathan-M-Wilson/rails-engine.git
cd rails_engine
bundle install
rake db:{create,migrate,seed}
bundle exec rspec to run the test suite
Rails Engine has been fully tested. To view the test coverage;
Once inside your terminal within the Rails Engine directory run the following command.
open coverage
This will open up a folder with an index.html file. Clicking on this file will show you a list of all lines of code within this project, and whether they have been tested or not.
Additionally, running bundle exec rspec
will show you the quick summary of the test coverage in this application.
After running your migrations, your schema will look something like this!
Below are listed some examples of the endpoints within Rails Engine. To see all endpoint available, please checkout the docs!
List of all merchants recorded in the database
response
{
"data": [
{
"id": "1",
"type": "merchant",
"attributes": {
"name": "Schroeder-Jerde"
}
},
{
"id": "2",
"type": "merchant",
"attributes": {
"name": "Klein, Rempel and Jones"
}
}
]
}
Information about a specific merchant
{
"data": {
"id": "1",
"type": "merchant",
"attributes": {
"name": "Schroeder-Jerde"
}
}
}
Total revenue for a specified merchant.
{
"data": {
"id": null,
"type": "revenue",
"attributes": {
"revenue": 714320.6700000002
}
}
}
See the open issues for a list of proposed features, known issues, and project extensions.
Contributions are what make this community such an amazing and fun place to learn, grow, and create! Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch
git checkout -b feature/NewGreatFeature
- Commit your Changes
git commit -m 'Add some NewGreatFeature'
- Push to the Branch
git push origin feature/NewGreatFeature
- Open a new Pull Request!
Jonathan Wilson - - GitHub
Project Link: Rails Engine