{"id":18638748,"url":"https://github.com/starsheriff2/expert-class","last_synced_at":"2025-04-11T10:31:45.683Z","repository":{"id":45014357,"uuid":"417223771","full_name":"StarSheriff2/expert-class","owner":"StarSheriff2","description":"This app allows users to sign up for a class taught by experts and gurus. This is the back-end, a RESTful API hosted in Heroku. The front-end is hosted in Netlify.","archived":false,"fork":false,"pushed_at":"2023-03-14T23:37:09.000Z","size":7398,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2023-03-15T00:12:06.077Z","etag":null,"topics":["docker","docker-compose","full-stack","railway-deployment","react","ruby-on-rails"],"latest_commit_sha":null,"homepage":"https://expert-class-frontend-v2.netlify.app","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StarSheriff2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-14T17:29:35.000Z","updated_at":"2023-03-14T17:08:08.000Z","dependencies_parsed_at":"2022-08-28T10:01:59.998Z","dependency_job_id":null,"html_url":"https://github.com/StarSheriff2/expert-class","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarSheriff2%2Fexpert-class","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarSheriff2%2Fexpert-class/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarSheriff2%2Fexpert-class/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarSheriff2%2Fexpert-class/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StarSheriff2","download_url":"https://codeload.github.com/StarSheriff2/expert-class/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223466502,"owners_count":17149770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","full-stack","railway-deployment","react","ruby-on-rails"],"created_at":"2024-11-07T05:43:25.370Z","updated_at":"2024-11-07T05:43:26.157Z","avatar_url":"https://github.com/StarSheriff2.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003e\u003ca href=\"https://expert-class-production.up.railway.app/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eExpert Class API\u003c/a\u003e\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Ruby_on_Rails-darkred?logo=rubyonrails\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/-PostGreSQL%2015.1-4169E1?logo=postgresql\u0026logoColor=white\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/-Swagger-85EA2D?logo=swagger\u0026logoColor=black\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/-Docker-2496ED?logo=docker\u0026logoColor=white\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Cloudinary-purple\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Rspec-yellow\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Factory_Bot-red\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/-Ruby%20Gems-E9573F?logo=RubyGems\u0026logoColor=white\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/-Rubocop-000000?logo=Rubocop\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/-Railway-0B0D0E?logo=Railway\"\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003eThis \u003cstrong\u003eRESTFUL\u003c/strong\u003e API works as the backend for a React web app. The \u003cstrong\u003e\u003ci\u003edockerized\u003c/i\u003e\u003c/strong\u003e container of the app is currently hosted on \u003cstrong\u003eRailway\u003c/strong\u003e. All images are hosted in Cloudinary.\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\u003cimg width=\"100%\" alt=\"app screenshot mobile\" src=\"./.github/images/Screenshot_main.png\"\u003e\n\u003cimg width=\"45%\" alt=\"app screenshot mobile\" src=\"./.github/images/Screenshot_register.png\"\u003e\n\u003cimg width=\"45%\" alt=\"app screenshot mobile\" src=\"./.github/images/Screenshot_remove.png\"\u003e\n\u003cimg width=\"30%\" alt=\"app screenshot mobile\" src=\"./.github/images/Screenshot_main_mobile.png\"\u003e\n\u003cimg width=\"30%\" alt=\"app screenshot mobile\" src=\"./.github/images/Screenshot_nav_mobile.png\"\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003c!-- omit from toc --\u003e\n## Table of Contents\n- [About](#about)\n  - [API Documentation](#api-documentation)\n  - [Features](#features)\n  - [Front-end React app](#front-end-react-app)\n  - [Live Demo](#live-demo)\n  - [Video Presentation](#video-presentation)\n  - [Built With](#built-with)\n  - [Project Management](#project-management)\n- [Setup and Installation](#setup-and-installation)\n    - [Get files](#get-files)\n  - [Cloudinary Setup](#cloudinary-setup)\n  - [Docker Deploy](#docker-deploy)\n    - [Prerequisites](#prerequisites)\n    - [Run](#run)\n  - [Local deploy](#local-deploy)\n    - [Prerequisites](#prerequisites-1)\n    - [Install Dependencies](#install-dependencies)\n  - [Database Setup](#database-setup)\n- [Usage](#usage)\n- [Development](#development)\n  - [Testing](#testing)\n    - [Coverage report](#coverage-report)\n  - [Linters](#linters)\n- [Authors](#authors)\n- [🤝 Contributing](#-contributing)\n- [Show your support](#show-your-support)\n- [📝 License](#-license)\n\n\n## About\nExpert Class API is the backend for a ***fully responsive*** web app that I built with a team of 4 members. The front end of the app is handled separately by another app. The [repo for the front-end is here](https://github.com/StarSheriff2/expert-class-frontend). The API documentation of this project was generated with the \u003cstrong\u003e'rswag'\u003c/strong\u003e gem. We built request and integration tests, achieving a 95% coverage. We use cross-site session cookies to handle user authentication. We use PostgreSQL as the database and Cloudinary to store all images in the cloud.\n\n### API Documentation\nWe used Rswag to generate all the API documentation directly from our tests. You will find all the endpoints necessary to use our API here:\n[Documentation](https://expert-class-production.up.railway.app/api-docs)\n\n### Features\n- authenticate user\n- create new user\n- create and delete a class\n- show all classes\n- show all reserved classes\n- reserve a class\n\n### Front-end React app\n- The front-end associated with this app is [here](https://expert-class-frontend-v2.netlify.app).\n\n- The Github repo of the front-end is [here](https://github.com/StarSheriff2/expert-class-frontend).\n\n### Live Demo\n\nDeployed to **Railway**: [Live Demo](https://expert-class-production.up.railway.app/api/v1/healthcheck)\n\n### Video Presentation\n\nWatch a quick demo and walk-through of this project:\n\u003ca href=\"https://www.loom.com/share/bf3cfe3590a9404da7badb3012248a57\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n  \u003cp\u003eExpert Class - 13 January 2022 - Watch Video\u003c/p\u003e\n  \u003cimg style=\"max-width:300px;\" src=\"https://cdn.loom.com/sessions/thumbnails/bf3cfe3590a9404da7badb3012248a57-with-play.gif\"\u003e\n\u003c/a\u003e\n\n### Built With\n- Ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) \\[arm64-darwin20\\]\n- Rails 6.1.4.1\n- PostgreSQL 14\n- Cloudinary (for image storing)\n- Rspec (testing)\n- Faker gem\n- Factory bot\n- Docker 20.10.22\n- Docker compose v2.15.1\n\n### Project Management\n\nWe used an agile methodology to manage all the tasks in this project. This project's tasks are described in [this kanban board](https://github.com/StarSheriff2/expert-class/projects/1).\n\nWe used GitHub's built-in Kanban board:\n![kanban](https://user-images.githubusercontent.com/61250665/137405588-7fc8d606-5b01-43ca-beae-5c29ae231d2e.png)\n\n## Setup and Installation\n\nTo get a local copy up and running, follow these simple example steps.\n\n#### Get files\n1. Open your terminal or command prompt.\n2. If you do not have git installed in your system, skip this step and go to step 3; otherwise, go to the directory where you want to copy the project files and clone it by copying this text into your command prompt/terminal:\n```\n  git clone git@github.com:StarSheriff2/expert-class.git\n```\n  \u003cbr\u003e\n\n  *Now go to either the ***\"Docker Deploy\"*** or the ***\"Local Deployt\"*** section, depending on how you wish to deploy the API in your system.*\n\n  \u003cbr\u003e\n\n3. Download the program files by clicking on the green button that says “**Code**” on the upper right side of the project frame.\n4. You will see a dropdown menu. Click on “**Download ZIP**.”\n5. Go to the directory where you downloaded the **ZIP file** and open it. Extract its contents to any directory you want in your system.\n\n### Cloudinary Setup\n\u003e You will need a Cloudinary account to be able to deploy this app locally or through Docker. If you already have one, look for the **API Environment variable**, which you will find in your cloudinary dashboard:\n\u003e - for a Docker deployment, copy the **API Environment variable** into your .env file:\n\n```bash\nCLOUDINARY_URL=\u003cyour_unique_cloudinary_url\u003e\n```\n\u003e - for a local deployment, copy the **API Environment variable** into your *config/cloudinary.rb* file, by replacing the text \"\u003ccloudinary_url_here\u003e\" with the respective value of your **API Environment variable**\n\n\u003e ; otherwise, create a new account by going to Cloudinary and sign up for a free account: [https://cloudinary.com/](https://cloudinary.com/).\n\nOnce you have your new Cloudinary account set up, follow these steps:\n1. Login with your new account\n2. Go to your Cloudinary dashboard\n3. Look for the **API Environment variable**\n   ![cloudinary_yml_file](.github/images/cloudinary_setup_img.png)\n4. Do the following:\n   - for a local deployment, copy it into your *.env file*, like exaplained above\n   - for a Docker deployment, copy it into your *config/cloudinary.rb* file like explained above\n\n\n### Docker Deploy\n\n#### Prerequisites\n\n- Docker 20.10.22 or latest\n- Docker Compose v2.15.1\n\n#### Run\n\n```bash\n  docker compose up -d\n```\n\n### Local deploy\n\n#### Prerequisites\n- Ruby 3.0.2p107\n- Rails 6.1.4.1\n- PostgreSQL 14\n- Cloudinary account and cloudinary_url\n\n#### Install Dependencies\n1. If you are not in your system terminal/command prompt already, please open it and go to the directory where you cloned the remote repository or extracted the project files.\n2. While in the project root directory, type\n    ```\n    bundle install\n    ```\n    This command will install all the necessary gems in your system.\n\n### Database Setup\n\nRun\n\n```bash\nbin/rails db:setup\n```\nThis will create your local databases, load the schema, and initialize with the seed data.\n\n**Note:** If you get an error after running this command, it might be because you don't have a database called ***\"postgres\"***. This happens because when you create a new Rails application, Rails uses this \"postgres\" database to create and manage the databases for your application. You can easily create one by running this command:\n```bash\ncreatedb postgres\n```\n\nIf Rails still complains about not finding the \"postgres\" role, you can create one with super-user priviledges:\n```bash\ncreateuser -s postgres\n```\n\nNow try running the db:setup command again!\n\nYou are all set now!\n## Usage\n\n1. In your terminal, run\n    ```bash\n    bin/rails server\n    ```\n    while inside the root directory of the repository files\n\n    **Note:** _This command will not stop on its own. To exit, hit \"ctrl + c\"_\n\n2. The app allows API calls using curl or your favorite API client, such as Postman, HTTPPie or VS Code's Thunder Client. Here's a link to [HTTPIE](https://httpie.io).\n\n## Development\n### Testing\nWe created all types of tests for this project:\n - Unit / Model tests\n - Integration tests\n - API request tests\n\n#### Coverage report\n  ![test Coverage](.github/images/test_coverage_screenshot.png)\n\nTo run all tests, type this into command line:\n```bash\nbundle exec rspec\n```\n\n### Linters\nTo run ***Rubocop***, go to the root directory of your repository and copy/paste the following command into your terminal:\n```\n rubocop .\n```\n\n## Authors\n👤 **Arturo Alvarez**\n- Github: [@StarSheriff2](https://github.com/StarSheriff2)\n- Twitter: [@ArturoAlvarezV](https://twitter.com/ArturoAlvarezV)\n- Linkedin: [Arturo Alvarez](https://www.linkedin.com/in/arturoalvarezv/)\n\n👤 **Breno Xavier**\n\n- GitHub: [@brenoxav](https://github.com/brenoxav)\n- LinkedIn: [Breno Xavier](https://linkedin.com/in/brenoxav)\n\n👤 **Francis Uloko**\n\n- GitHub: [@francisuloko](https://github.com/francisuloko)\n- Twitter: [@francisuloko](https://twitter.com/francisuloko)\n- LinkedIn: [Francis Uloko](https://linkedin.com/in/francisuloko)\n\n👤 **Mih Julius**\n\n- GitHub: [@Mihndim2020](https://github.com/Mihndim2020)\n- Twitter: [@mihndim](https://github.com/mih-julius)\n- LinkedIn: [Mih Julius](https://www.linkedin.com/mih-julius)\n\n## 🤝 Contributing\n\nContributions, issues, and feature requests are welcome!\n\nFeel free to check the [issues page](https://github.com/StarSheriff2/expert-class/issues).\n\n## Show your support\n\nGive a ⭐️ if you like this project!\n\n## 📝 License\n\nThis project is [MIT](https://github.com/StarSheriff2/expert-class/blob/master/LICENSE) licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarsheriff2%2Fexpert-class","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarsheriff2%2Fexpert-class","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarsheriff2%2Fexpert-class/lists"}