https://github.com/tuanle03/code_learn_api
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.
https://github.com/tuanle03/code_learn_api
grape-api jwt ruby ruby-on-rails swagger-ui
Last synced: 4 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/tuanle03/code_learn_api
- Owner: tuanle03
- Created: 2023-12-11T18:51:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-11-13T03:34:00.000Z (7 months ago)
- Last Synced: 2025-11-13T04:20:31.956Z (7 months ago)
- Topics: grape-api, jwt, ruby, ruby-on-rails, swagger-ui
- Language: Ruby
- Homepage: https://codelearn-api-72b30d70ca73.herokuapp.com/docs
- Size: 5.93 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](#features)
- [Prerequisites](#prerequisites)
- [Getting Started](#getting-started)
- [Installation](#installation)
- [JWT Authentication](#jwt-authentication)
- [API Documentation](#api-documentation)
- [Interactive Database Queries](#interactive-database-queries)
- [Contributing](#contributing)
- [License](#license)
## 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:
```bash
git clone git@github.com:tuanle03/code_learn_api.git
cd code_learn_api
```
2. Install dependencies:
```bash
bundle
```
3. Set up the database:
```bash
rails db:create db:migrate db:seed
```
4. Start project
```bash
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:
```bash
Token: YOUR_TOKEN
```
## API Documentation
Explore the API endpoints and test them using the Swagger documentation at `http://localhost:2106/docs`.

## 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.

## 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!