Skip to content

DanSam5K/awesome-events-back-end

 
 

Repository files navigation

Awesome Events (Back-End)!

Live Version

ERD

ERD

Kanban Board

Kanban Board Url

Kanban Board First Step

Kanban Board First Step

Kanban Board Final Step

Kanban Board Final Step

About

The main goals for this exercise are:

  • Implement a connection between a Ruby on Rails back-end and ReactJS front-end.
  • Understand the pros and cons of different approaches of connecting Ruby on Rails back-end with ReactJS front-end.

In this project, only the Ruby on Rails back-end part was implemented. The front-end part of the project can be found in this repo.

Built With

  • Ruby on Rails
  • RSpec
  • PostgreSQL
  • JWT
  • Cloudinary
  • VisualStudio Code, Git, & GitHub

Pre-requisites

  • Ruby (v. 3.0.1)
  • Rails (v. 6.1.4)
  • NodeJs (v. 14.17)
  • YarnJs (v. 1.22.10)
  • PostgreSQL (v. 12.8)
  • Git

Getting Started

  1. In your terminal, in the folder of your preference, type the following bash command to clone this repository:
git clone git@github.com:aristides1000/awesome-events-back-end.git
  1. Now that you have already cloned the repo run the following commands to get the project up and running:
cd awesome-events-back-end
bundle
rails db:create
rails db:migrate
  1. Now, on your terminal, run:
rails server

This should start your local server in http://localhost:3000/. Now, you can open the REST API client of your choice (Thunder Client extension for VScode is recommended) to fetch the data from the API.

Live API endpoint

https://awesome-events-back-end.herokuapp.com/

API Endpoints

Description Endpoint Method Header Body
Sign Up /users POST { "Accept": "application/json", "Content-Type": "application/json" } {"user": {"name": "Daniel", "email": "daniel@mail.com", "password": "123456", "password_confirmation": "123456"}}
Sign In /users/sign_in POST { "Accept": "application/json", "Content-Type": "application/json" } {"user": {"email": "daniel@mail.com", "password": "123456"}}
Sign Out /users/sign_out DELETE { "Accept": "application/json", "Content-Type": "application/json", "Authorization": "Bearer " }
Fetch User Properties from Token /logged_user GET { "Accept": "application/json", "Content-Type": "application/json", "Authorization": "Bearer " }
Fetch all available events /events GET { "Accept": "application/json", "Content-Type": "application/json", "Authorization": "Bearer " }
Create a new Event /events POST { "Accept": "application/json", "Authorization": "Bearer " } FormData(name: 'Event Title', description: 'Event Description', image: ))
Delete an Event (Only the Event Creator can perform this action) /events/:event_id DELETE { "Accept": "application/json", "Content-Type": "application/json", "Authorization": "Bearer " }
Reserve an Event /attendances POST { "Accept": "application/json", "Content-Type": "application/json", "Authorization": "Bearer " } { "attendance": { "event_id": 1, "date": "2025-01-01", "city": "Caracas" } }
Fetch all user's Reservations /attendances GET { "Accept": "application/json", "Content-Type": "application/json", "Authorization": "Bearer " }
Cancel a Reservation (Only the Attendee can perform this action) /attendances/:reservation_id DELETE { "Accept": "application/json", "Content-Type": "application/json", "Authorization": "Bearer " }

To stop the server, hit <CTRL> + C on your keyboard.

You can also find an API-consumer built with ReactJS in this repo that will display one random greeting message in your browser.

Author 👤

👨‍💻 Daniel Samuel

👨‍💻 Arístides José Molina Pérez

👨‍💻 Ênio Neves de Souza

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Hat tip to anyone whose code was used 🔰
  • Inspiration 💘
  • Microverse program ⚡
  • Our standup team 🏹
  • Our family's support 🙌

📝 License

This project is MIT licensed.

About

Final Capstone Project for Microverse Full-stack Application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 99.6%
  • HTML 0.4%