Skip to content

andrewasmit/repertoire

Repository files navigation

Repertoire

A Digital Music Library & Curriculum Planner

This web app allows band directors to house their entire music library digitally so they have the abilityt to track when pieces were performed throughout their career. By keeping notes on each piece as they program concerts, they create a log of import details that will help them program in the future.

Project Details

This project focused on building a Sinatra API backend that uses Active Record to access and persist data to a database

The project all utilizes a separate React frontend that interacts with the database via the API.

Requirements

For this project, you must:

  • Use Active Record to interact with a database.
  • Have at least two models with a one-to-many relationship.
  • At a minimum, set up the following API routes in Sinatra:
    • create and read actions for both models
    • full CRUD capability for one of the models
  • Build a separate React frontend application that interacts with the API to perform CRUD actions.
  • Implement proper front end state management. You should be updating state using a setState function after receiving your response from a POST, PATCH, or DELETE request. You should NOT be relying on a GET request to update state.
  • Use good OO design patterns. You should have separate classes for each of your models, and create instance and class methods as necessary.
  • Routes in your application (both client side and back end) should follow RESTful conventions.
  • Use your back end optimally. Pass JSON for related associations to the front end from the back end. You should use active record methods in your controller to grab the needed data from your database and provide as JSON to the front end. You should NOT be relying on filtering front end state or a separate fetch request to retrieve related data.

Getting Started

Backend Setup

Fork and clone this repository to get started. Then, run bundle install to install the gems.

Important: Be sure you fork a copy of the repo into your GitHub account before cloning it. You can do this by using the link above or by clicking the "Octocat" button at the top of this page, then clicking "Fork" in the upper right corner of the repo page.

You can start your server with:

$ bundle exec rake server

This will run your server on port http://localhost:9292.

Frontend Repo

The frontend repo can be foundHERE. Then, run npm i && npm start to install the necessary dependencies.

Project Tips

  • This project is intended to focus more on the backend than the frontend, so try and keep the React side of things relatively simple. Focus on working with Active Record and performing CRUD actions. What are some interesting queries you can write? What kinds of questions can you ask of your data?
  • Once you have a project idea, come up with a domain model and decide what relationships exist between the models in your application. Use a tool like [dbdiagram.io][] to help visualize your models.
  • Decide on your API endpoints. What data should they return? What kind of CRUD action should they perform? What data do they need from the client?
  • Use [Postman][postman download] to test your endpoints.
  • Use binding.pry to debug your requests on the server. It's very helpful to use a binding.pry in your controller within a route to see what params are being sent.
  • Use the [Network Tab in the Dev Tools][network tab] in the frontend to debug your requests.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%