SnailMail is a full-stack web application built with React, Node.js, and MySQL that simulates a digital post office system.
Frontend: React (Vite)
Backend: Node.js
Database: MySQL
Language: JavaScript (ES Modules)
SnailMail/
βββ client/ # Frontend React application
β βββ src/
β β βββ assets/ # Images and static resources
β β βββ components/ # Reusable UI elements (buttons, forms, etc.)
β β βββ pages/ # Main pages and views (e.g., Home, Login, Dashboard)
β βββ public/
β βββ .env # Frontend environment variables
β
βββ server/ # Backend Node.js application
β βββ controllers/ # Business logic and SQL query handling
β βββ routers/ # API route definitions
β βββ utils/ # Helper and utility functions
β βββ config/ # MySQL database configuration
β βββ server.js # Entry point to start the backend server
β βββ .env # Backend environment variables
β
βββ README.md # Project documentation
β οΈ Both.envfiles are git ignored to protect sensitive information. Therefore, you must manually create your own .env files on the client and server folders.
MYSQLHOST=localhost
MYSQLPORT=3306
MYSQLUSER=root
MYSQLPASSWORD=<yourPassword>
MYSQL_DATABASE=postOfficeDatabase
PORT=8000
VITE_API_URL=http://localhost:8000
git clone https://github.com/EdwardVNguyen/SnailMail.git
cd SnailMail
### Install dependencies
cd server
npm install
cd client
npm install
### Run frontend and backend to run web application
cd server
npm run dev
cd client
npm run dev