๐ Academic Exchange Platform
A full-stack web application that allows students to buy, sell, or rent academic books and study materials. The platform connects sellers and buyers in a simple, secure, and affordable way.
๐ Project Overview
Many students finish semesters with unused books, while others struggle to find affordable resources. Academic Exchange solves this by providing a centralized marketplace for educational materials.
Users can:
Register & log in securely
List books for sale or rent
Browse available listings
Contact sellers
Manage their own listings
๐ ๏ธ Tech Stack Frontend
HTML
CSS
JavaScript
Tailwind CSS (if used)
Backend
Node.js
Express.js
MySQL
JWT Authentication
bcrypt (password hashing)
dotenv (environment variables)
๐ Project Structure project-root/ โ โโโ backend/ โ โโโ config/ # Database configuration โ โโโ controllers/ # Business logic โ โโโ routes/ # API routes โ โโโ middleware/ # Auth & error handling โ โโโ models/ # Database queries โ โโโ app.js # Express app โ โโโ server.js # Server entry point โ โโโ frontend/ โ โโโ index.html โ โโโ css/ โ โโโ js/ โ โโโ .env โโโ package.json โโโ README.md
๐ Authentication Flow
User passwords are hashed using bcrypt
Login returns a JWT token
Protected routes require valid JWT
Token is verified using middleware
๐๏ธ Database Design
Main tables:
users
listings
categories
orders (optional)
Features:
Foreign key relationships
Indexed columns for faster queries
Input validation before DB operations
โ๏ธ Installation & Setup 1๏ธโฃ Clone the Repository git clone https://github.com/your-username/academic-exchange.git cd academic-exchange
2๏ธโฃ Install Backend Dependencies cd backend npm install
3๏ธโฃ Configure Environment Variables
Create a .env file in backend/:
PORT=5000 DB_HOST=localhost DB_USER=root DB_PASSWORD=yourpassword DB_NAME=academic_exchange JWT_SECRET=your_jwt_secret
4๏ธโฃ Start the Server npm start
Server will run at:
๐ก API Endpoints (Sample) Auth
POST /api/auth/register
POST /api/auth/login
Listings
GET /api/listings
POST /api/listings
PUT /api/listings/:id
DELETE /api/listings/:id
๐งช Testing
Use Postman to test APIs
Verify protected routes using JWT token
Test database constraints and validations
๐ Known Issues
Some routes may have missing validations
UI improvements pending
Pagination & search optimization not implemented
๐ฎ Future Enhancements
Image uploads for listings
Search & filter functionality
Chat between buyer and seller
Admin dashboard
Deployment on cloud (AWS / Render)
๐จโ๐ป Contributors
Vamsi โ Backend & Database
Friends / Team members โ Feature contributions
๐ License
This project is created for educational purposes.