All work
JavaScript · React · Redux Toolkit
MySql-blog-app
Full-stack blog — JWT auth, guarded routes and post CRUD, React + Mantine on an Express/MySQL API.
Stars4
LanguageJavaScript
Last push21 Mar 2026
Topics
express-jsmantinemysql-databasenodejsreactjsredux-toolkittailwindcssvite
MySql-blog-app ✍️
A full-stack blog application designed with a React frontend and an Express/Node.js backend, powered by a MySQL database. This application enables users to manage blog posts through a secure, authenticated interface.
📑 Table of Contents
🌟 Features
- 🔐 Authentication: User registration and secure login using JWT (JSON Web Tokens).
- 📝 CRUD Operations: Create, Read, Update, and Delete blog posts.
- 🛡️ Route Guards: Protected routes ensuring only authenticated users can create, edit, or delete content.
- 🎨 Modern UI: Built with Tailwind CSS and Mantine components for a responsive and clean design.
- ⚡ State Management: Redux Toolkit used for efficient state handling across the application.
- 🔄 Real-time feedback: Integrated with
react-hot-toastfor user notifications.
🛠 Tech Stack
| Role | Technology |
|---|---|
| Frontend | React, Vite, Tailwind CSS, Mantine, Redux Toolkit |
| Backend | Node.js, Express, JSONWebToken, Crypto-JS |
| Database | MySQL (via mysql2 driver) |
🚀 Installation
Prerequisites
- Node.js installed
- MySQL server running
Setup Instructions
-
Clone the repository:
git clone https://github.com/Kyaw-Min-Khant/MySql-blog-app -
Setup Server:
cd server npm install # Create a .env file with: PORT, HOST, USERDATA, PASSWORD, DATABASE, DBPORT, PASSWORD_SECRET, JWTSEC node index.js -
Setup Client:
cd client npm install npm run dev
🗄 Database Setup
Execute the following in your MySQL environment:
CREATE DATABASE Blog;
USE Blog;
CREATE TABLE User (
id INT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(50),
email VARCHAR(50) UNIQUE,
password VARCHAR(255)
);
CREATE TABLE Post (
id INT PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(50),
content VARCHAR(1000),
user_id INT
);
💡 Usage
- Register an account using the Sign Up page.
- Login to get an access token stored in Cookies.
- Create new posts via the 'Create' button.
- Edit or delete your own posts from the post list.
📁 Project Structure
/client: React application containing components, API services, and pages./server: Express API with routes forauthandbloglogic.
Created by Kyaw-Min-Khant. If you find this project helpful, please consider giving it a ⭐ on GitHub.
Also in JavaScript