83

EATS Backend v1

A Ruby on Rails backend for EATS, a food discovery web application developed as a phase 5 project for Flatiron School. This version provides API endpoints and database management for the EATS frontend.

EATS Backend v1

Project Overview

EATS Backend v1 was developed as part of the phase 5 project for Flatiron School in Houston, Texas. This Ruby on Rails application serves as the backend for the EATS food discovery platform, providing API endpoints and database management.

Note: This project is no longer in active development. For the latest version, please see EATS 2024.

Key Features

  • RESTful API: Provides endpoints for food and restaurant data retrieval.
  • Database Management: Handles data persistence for user profiles and restaurant information.
  • Authentication: Implements user authentication and authorization.
  • Environment Configuration: Utilizes environment variables for secure configuration management.

Technologies Used

  • Framework: Ruby on Rails
  • Database: PostgreSQL
  • API Design: RESTful principles
  • Authentication: JWT, Devise

Setup and Installation

To set up the EATS Backend v1 locally:

  1. Clone the repository: git clone https://github.com/sir-udenna/rails-eats-2.git
  2. Navigate to the project directory: cd rails-eats-2
  3. Install dependencies: bundle install
  4. Set up environment variables:
    • Create a .env file in the root directory (use .envEXAMPLE as a template)
    • Configure necessary environment variables (see Environment Variables section)
  5. Set up the database: rails db:create db:migrate
  6. Start the server: rails server

Important: Ensure the backend server is running before starting the frontend application for full functionality.

Available Scripts

  • bundle install: Installs the project's Ruby dependencies.
  • rails server: Starts the backend server.
  • rails db:create db:migrate: Sets up the database.
  • rails db:seed: Populates the database with sample data (if available).

Environment Variables

Configure the following in your .env file:

  • DATABASE_URL: URL for your database connection.
  • SECRET_KEY_BASE: Secret key for securing your application.

API Endpoints

(List and briefly describe the main API endpoints, e.g.:)

  • GET /api/restaurants: Retrieves a list of restaurants.
  • POST /api/users: Creates a new user account.
  • GET /api/users/:id: Retrieves user profile information.

Challenges and Solutions

  • Data Modeling: Designed an efficient schema to represent complex relationships between users, restaurants, and reviews.
  • API Performance: Implemented caching strategies to improve response times for frequently accessed data.
  • Security: Utilized Rails best practices for secure handling of user authentication and data protection.

Conclusion

EATS Backend v1 demonstrates my proficiency in building robust backend systems using Ruby on Rails. This project showcases my skills in API development, database design, and backend architecture. While no longer in active development, it served as a crucial component of the EATS ecosystem and laid the groundwork for future iterations of the project.