Skip to content

concertmate/rails_be

Repository files navigation

Concertmate Backend App

Description

This is a backend application built with Ruby on Rails. It serves as the backend for managing users, events, and artist data. The application provides RESTful APIs for creating, reading, updating, and deleting (CRUD) resources like users, artists, and events.

Features Provided

•	Manage users and their saved artists.
•	Create and manage events.
•	Associate users with events and allow users to attend events.
•	RESTful API endpoints for handling various resources.

Setup Guide

  1. Clone the Repository
  2. Install App Dependencies (bundle install)
  3. Set up Database (rails db:drop, rails db:create, rails db:migrate, rails db:seed)
  4. Run the server locally (rails s)

Endpoints

Users

•	GET /api/v1/users - Get a list of all users
•	GET /api/v1/users/:id - Get a specific user
•	POST /api/v1/users - Create a new user
•	PATCH/PUT /api/v1/users/:id - Update a user
•	DELETE /api/v1/users/:id - Delete a user

Artists

•	GET /api/v1/artists - Get a list of artists (with optional search parameters)
•	POST /api/v1/artists - Add an artist to a user’s saved artists
•	DELETE /api/v1/artists/:id - Remove an artist from a user’s saved artists

Events

•	GET /api/v1/events - Get a list of all events
•	GET /api/v1/events/:id - Get a specific event
•	POST /api/v1/user_events - Create an event for a user
•	DELETE /api/v1/user_events/:id - Remove a user from an event
•	GET /api/v1/users/:user_id/user_events - Get all events associated with a specific user
•	GET /api/v1/users/:user_id/user_events/:id - Get a specific event associated with a specific user

Attendees

•	POST /api/v1/attendees - Add a user to an event's attendees
•	DELETE /api/v1/attendees/:id - Remove a user from an event's attendees
•	GET /api/v1/events/:event_id/attendees - Get a list of all attendees for a specific event

Concerts

•	GET /api/v1/concerts - Gets the top concert for the artist chosen

Example Requests

Deployed URL: https://concertmate-rails-9f7aa871924c.herokuapp.com/

Http Method, Route, Body

  1. Create a user POST http://localhost:3000/api/v1/users
Screenshot 2024-09-13 at 2 39 45 PM
  1. Add an Artist to a Users saved artist POST http://localhost:3000/api/v1/artists
Screenshot 2024-09-13 at 3 02 18 PM
  1. Creating an Event POST http://localhost:3000/api/v1/users/1/user_events
Screenshot 2024-09-13 at 2 56 07 PM
  1. Deleting an Event DELETE http://localhost:3000/api/v1/users/1/user_events/1 Screenshot 2024-09-13 at 3 12 25 PM

  1. Adding a User to and Event as an Attendee POST http://localhost:3000/api/v1/attendees
Screenshot 2024-09-13 at 3 23 11 PM
  1. Removing a User from an Event DELETE http://localhost:3000/api/v1/attendees/:user_id
Screenshot 2024-09-13 at 3 57 21 PM
  1. Getting All Attendees for an Event GET http://localhost:3000/api/v1/attendees?event_id=:event_id
Screenshot 2024-09-13 at 3 33 05 PM
  1. Getting All Events for a User GET http://localhost:3000/api/v1/users/:user_id/user_events
Screenshot 2024-09-13 at 4 01 26 PM
  1. Getting a specific Event for a User GET http://localhost:3000/api/v1/users/:user_id/user_events/:event_id
Screenshot 2024-09-13 at 4 02 25 PM

Database Schema

Screenshot 2024-09-12 at 12 44 29 PM

Current Contributors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages