https://github.com/rafamguedes/codersblog
This project involves developing a Node.js API using the Sequelize package to perform CRUD operations on blog posts. The application also includes implementing user authentication and associating users, posts, and categories.
https://github.com/rafamguedes/codersblog
chai jwt-authentication mocha nodejs postgresql reactjs sequelize-orm sinon testing-library typescript vitest
Last synced: 2 months ago
JSON representation
This project involves developing a Node.js API using the Sequelize package to perform CRUD operations on blog posts. The application also includes implementing user authentication and associating users, posts, and categories.
- Host: GitHub
- URL: https://github.com/rafamguedes/codersblog
- Owner: rafamguedes
- Created: 2024-04-12T12:52:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-15T16:56:38.000Z (about 1 year ago)
- Last Synced: 2025-03-08T17:58:15.960Z (2 months ago)
- Topics: chai, jwt-authentication, mocha, nodejs, postgresql, reactjs, sequelize-orm, sinon, testing-library, typescript, vitest
- Language: TypeScript
- Homepage: https://codersblogg.vercel.app/
- Size: 3.56 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Coders Blog 👩💻
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
## ➡️ Project Description
This project involves developing a Node.js API using the Sequelize package to perform CRUD operations on blog posts. The application also includes implementing user authentication and associating users, posts, and categories.
Deploy: [Coders Blog!](https://codersblogg.vercel.app/)
## ➡️ Technologies
### ▶️ Back-end:
```
NodeJS, TypeScript, JWT, Sequelize, PostgreSQL, Mocha, Sinon, Chai and Docker
```### ▶️ Front-end:
```
ReactJS, TypeScript, Vite, Vitest, Testing Library and Axios
```
## ➡️ Features
### ▶️ RESTful Endpoints:
Implementation of endpoints to perform CRUD operations on posts.
### ▶️ User Authentication:
Creation of posts requires user authentication.
### ▶️ User-Post Relationship:
Establishment of a relationship between users and posts, ensuring each post is associated with a specific user.
### ▶️ Post-Category Relationship:
Use of categories to classify posts, establishing a relationship between posts and categories. Each post can belong to one or more categories.
## ➡️ Project Setup
### ▶️ Dependency Installation:
```
1. npm run install:apps - to install necessary dependencies.
2. npm run compose:up - to start the backend container and database.
3. npm run dev - to start the frontend
```### ▶️ Database Configuration:
```
- Configure the database connection information in the config/database.js file.
```## ➡️ Endpoints
### ▶️ User
```
- POST /user - Create a new user
- GET /user - Get all users. (requires authentication)
- GET /user/:id - Get user by ID. (requires authentication)
- PUT /user/:id - Update user. (requires authentication)
- DELETE /user:id - Delete user. (requires authentication)
```### ▶️ Post
```
- GET /post: Retrieves the list of all posts.
- GET /post/search: Search for a post using a string
- POST /post: Creates a new post. (requires authentication)
- GET /post/:id: Retrieves details of a specific post. (requires authentication)
- PUT /post/:id: Updates an existing post. (requires authentication)
- DELETE /post/:id: Deletes an existing post. (requires authentication)
```### ▶️ Categories
```
- POST /categories - Create a new category. (requires authentication)
- GET /categories - Get all categories. (requires authentication)
- PUT /categories/:id - Update category. (requires authentication)
- DELETE /categories/:id - Delete category. (requires authentication)
```
### ▶️ Authentication
```
- POST /login: Performs user login.
- GET /login/role: Get the user role. (requires authentication)
```## ➡️ ScreenShots
### ▶️ Home Page
### ▶️ Single Post Page
### ▶️ Login Page
### ▶️ Dashboard Page
### ▶️ Create Post Page
### ▶️ Edit Post Page
### ▶️ Tags Page
### ▶️ Profile Page