Developed by: Sara Abodeeb
SkillSwap is a web-based platform designed to enable skill exchange between university students using a time-based virtual currency system. It creates a collaborative ecosystem where university students can exchange skills (e.g., "I teach you Python, you teach me Graphic Design") using a unique time-bartering currency system called "SkillCoins."
- Designed and implemented a time-based virtual currency system (SkillCoins) with transaction logging to ensure data consistency.
- Modeled relational data with many-to-many relationships to support users, skills, and exchanges.
- Built a RESTful backend using MVC architecture with clear separation of concerns.
- Focused on correctness and edge-case handling in skill exchange and balance updates.
- Secure Authentication: Implemented user registration and login using bcrypt for password hashing and encryption.
- Session Management: Secure session handling for persistent user states.
- Global Chat: A community discussion board built using AJAX/Fetch API with polling integration for near-real-time updates without refreshing the page.
- SkillCoin System: Custom logic to track user balances, handling transactions (debit/credit) based on teaching hours.
- Dynamic Dashboard: Real-time tracking of learning history and coin balance via MySQL queries.
| Component | Technology |
|---|---|
| Backend | Node.js, Express.js |
| Database | MySQL (Relational DB) |
| Frontend | HTML5, CSS3, Vanilla JavaScript (DOM Manipulation) |
| Architecture | MVC (Model-View-Controller) Pattern, RESTful API |
The system uses a normalized relational database to ensure data integrity.

- Users Table: Stores credentials and SkillCoin balance.
- Transactions Table: Logs every skill exchange with timestamps.
- Messages Table: Stores chat history linked to users.
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/auth/register |
Register a new student |
POST |
/api/auth/login |
Authenticate user |
GET |
/api/dashboard |
Fetch user stats & coin balance |
GET |
/api/chat |
Retrieve latest community messages |
## 💻 How to Run Locally
1. **Clone the repository**
```bash
git clone [https://github.com/Saraabodeeb/SkillSwap.git](https://github.com/Saraabodeeb/SkillSwap.git)
cd SkillSwap
- Install Dependencies
npm install
- Database Setup
- Create a MySQL database named
skillswap_db. - Import the
schema.sqlfile located in the/databasefolder. - Configure your database credentials in
db.jsor.envfile.
- Start the Server
node server.js
- Access the App
Open
http://localhost:3000in your browser.
6. Environmental Variables: "Create a .env file in the root directory based on .env.example to secure your database credentials."
Security Note: "This project uses dotenv to manage configuration and ensure that sensitive information is never pushed to the repository."
- Replacing polling with WebSockets (Socket.io) for real-time messaging.
- Introducing JWT-based authentication for stateless session management.
- Adding a reputation system to evaluate skill exchanges.