A full-stack social feed application where users can create posts, interact with content through likes and comments, and manage their own posts and comments.
- User authentication and authorization
- Create posts to the public feed
- Like and unlike posts
- Add comments to posts
- Delete posts
- Delete comments
- RESTful API integration
- Form validation using Yup and Formik
- Responsive frontend using React and Vite
- React
- Vite
- React Router DOM
- Axios
- Formik
- Yup
- Node.js
- Express.js
- MySQL
- Sequelize ORM
- JWT Authentication
- bcrypt
- CORS
npm install express cors mysql2 bcrypt sequelize sequelize-cli jsonwebtokennpm install --save-dev vite @vitejs/plugin-react
npm install react react-dom react-router-dom axios formik yuppost-chat-app/
│
├── client/
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── routes/
│ │ └── App.jsx
│ └── package.json
│
├── server/
│ ├── config/
│ ├── controllers/
│ ├── middleware/
│ ├── models/
│ ├── routes/
│ ├── package.json
│ └── server.js
│
└── README.mdgit clone <your-repository-url>
cd post-chat-appNavigate to the server directory:
cd serverInstall dependencies:
npm installCreate a .env file inside the server folder:
PORT=3001
DB_HOST=localhost
DB_USER=root
# Post Chat App
A full-stack social feed application where users can create posts, interact with content through likes and comments, and manage their own posts and comments.
---
# Features
* User authentication and authorization
* Create posts to the public feed
* Like and unlike posts
* Add comments to posts
* Delete posts
* Delete comments
* RESTful API integration
* Form validation using Yup and Formik
* Responsive frontend using React and Vite
---
# Tech Stack
## Frontend
* React
* Vite
* React Router DOM
* Axios
* Formik
* Yup
## Backend
* Node.js
* Express.js
* MySQL
* Sequelize ORM
* JWT Authentication
* bcrypt
* CORS
---
# Packages Used
## Server Packages
```bash
npm install express cors mysql2 bcrypt sequelize sequelize-cli jsonwebtokennpm install --save-dev vite @vitejs/plugin-react
npm install react react-dom react-router-dom axios formik yuppost-chat-app/
│
├── client/
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── routes/
│ │ └── App.jsx
│ └── package.json
│
├── server/
│ ├── config/
│ ├── controllers/
│ ├── middleware/
│ ├── models/
│ ├── routes/
│ ├── package.json
│ └── server.js
│
└── README.mdgit clone <your-repository-url>
cd post-chat-appNavigate to the server directory:
cd serverInstall dependencies:
npm installCreate a .env file inside the server folder:
PORT=3001
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=yourpassword
DB_NAME=postchatdb
JWT_SECRET=your_secret_keyRun the server:
npm startNavigate to the client directory:
cd clientInstall dependencies:
npm installStart the Vite development server:
npm run dev- User registration
- User login
- JWT token authentication
- Create a post
- View all posts
- Delete a post
- Add comments to posts
- Delete comments
- Like posts
- Unlike posts
- Password hashing with bcrypt
- JWT authentication for secure routes
- Form validation using Formik and Yup
- Cross-Origin Resource Sharing enabled with CORS
- Edit posts and comments
- User profiles
- Upload images to posts
- Real-time notifications
- Dark mode support
- Real-time messaging/chat
npm run devStarts the frontend development server.
npm startStarts the backend server.
Developed by Mpho Rakgope DB_NAME=postchatdb
JWT_SECRET=your_secret_key
Run the server:
```bash
npm start
Navigate to the client directory:
cd clientInstall dependencies:
npm installStart the Vite development server:
npm run dev- User registration
- User login
- JWT token authentication
- Create a post
- View all posts
- Delete a post
- Add comments to posts
- Delete comments
- Like posts
- Unlike posts
- Password hashing with bcrypt
- JWT authentication for secure routes
- Form validation using Formik and Yup
- Cross-Origin Resource Sharing enabled with CORS
- Edit posts and comments
- User profiles
- Upload images to posts
- Real-time notifications
- Dark mode support
- Real-time messaging/chat
npm run devStarts the frontend development server.
npm startStarts the backend server.
Developed by Mpho Rakgope