Skip to content

Latest commit

Β 

History

269 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐌 SnailMail

SnailMail is a full-stack web application built with React, Node.js, and MySQL that simulates a digital post office system.


πŸš€ Tech Stack

Frontend: React (Vite)
Backend: Node.js
Database: MySQL
Language: JavaScript (ES Modules)


πŸ“ Project Structure

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

βš™οΈ Environment Variables

⚠️ Both .env files are git ignored to protect sensitive information. Therefore, you must manually create your own .env files on the client and server folders.

Backend (/server/.env)

MYSQLHOST=localhost
MYSQLPORT=3306
MYSQLUSER=root
MYSQLPASSWORD=<yourPassword>
MYSQL_DATABASE=postOfficeDatabase
PORT=8000

Frontend (/client/.env)

VITE_API_URL=http://localhost:8000

1️⃣ Clone the repository

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

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages