Skip to content

The CodeLearn API, built with Ruby on Rails, Grape API, JWT, and Swagger, offers a robust backend for a web blog app with CRUD operations. Features include JWT authentication, Swagger documentation, and adherence to Rails best practices.

Notifications You must be signed in to change notification settings

tuanle03/code_learn_api

Repository files navigation

CodeLearn API

Welcome to the CodeLearn API repository! This project is built using Ruby on Rails, Grape API, JWT (JSON Web Tokens), and Swagger. It provides a robust backend for a web blog application, allowing you to create, retrieve, update, and delete blog posts, comments, and more through a RESTful API.

Table of Contents

Features

  • User authentication and authorization using JWT.
  • CRUD operations for blog posts, comments, and user profiles.
  • API documentation using Swagger.
  • Consistent and clean codebase following Ruby on Rails best practices.

Prerequisites

Before you begin, ensure you have the following prerequisites installed:

  • Ruby (version 3.2.0)
  • Ruby on Rails (version 7.0)

Getting Started

Installation

  1. Clone the repository:

    git clone git@github.com:tuanle03/code_learn_api.git
    cd code_learn_api
  2. Install dependencies:

    bundle
  3. Set up the database:

    rails db:create db:migrate db:seed 
  4. Start project

    rails s

JWT Authentication

This project uses JSON Web Tokens (JWT) for user authentication. Make sure to include the JWT token in the Token header of your requests:

Token: YOUR_TOKEN

API Documentation

Explore the API endpoints and test them using the Swagger documentation at http://localhost:2106/docs.

image

Interactive Database Queries

We use Blazer for running SQL queries on our database. To access the Blazer dashboard, go to http://localhost:2106/mio. You can create, save, and run queries interactively. Blazer helps us gain insights into our data and make informed decisions.

image

Contributing

We welcome contributions! If you find a bug or have an enhancement in mind, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Happy coding!

About

The CodeLearn API, built with Ruby on Rails, Grape API, JWT, and Swagger, offers a robust backend for a web blog app with CRUD operations. Features include JWT authentication, Swagger documentation, and adherence to Rails best practices.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published