A modern, gamified skill-sharing platform where users exchange knowledge and grow together.
Features β’ Tech Stack β’ Setup β’ Structure β’ API β’ Contributing
- Secure registration & login with Werkzeug password hashing
- Password reset via email β styled HTML emails sent through Gmail SMTP
- CSRF protection on all forms (Flask-WTF)
- Rate limiting on sensitive endpoints (Flask-Limiter)
- Secure session cookies with HTTPOnly & SameSite flags
- Input validation with WTForms & email-validator
- SQL injection prevention via SQLAlchemy ORM
- Fuzzy matching algorithm β finds users even with partial skill name matches
- Weighted scoring system:
- π§© Mutual skill compatibility (25 pts per match)
- β User reputation & rating (10 pts per rating point)
- π Experience level / XP (scaled)
- π Timezone bonus (+10 pts for same timezone)
- Filter matches by skill category
- Skill proficiency levels: Beginner β Intermediate β Expert
- WebSocket-powered messaging via Flask-SocketIO
- Per-swap chat rooms with message history
- Unread message counter in navigation
- Read/unread message tracking
- XP Points:
- +10 XP β Adding a skill
- +50 XP β Completing a swap
- +50 XP β Receiving a review
- Level Progression: Beginner π± β Skilled π β Expert π₯ β Master π
- Achievement Badges:
Badge Requirement π€ First Swap Complete 1 swap β Rising Star Earn 200 XP π Skill Master Earn 500 XP π§βπ« Trusted Mentor Receive 5+ reviews
- Skill Marketplace β Browse users offering/wanting skills across 8 categories
- Swap Requests β Send, accept, reject, and complete skill exchanges
- Smart Scheduling β Set your weekly availability and propose swap times converted automatically to the viewer's timezone
- Review System β Rate (1-5 stars) and comment after completed swaps
- User Profiles β Customizable bio, social links (GitHub, LinkedIn, Portfolio)
- Portfolio Showcase β Add project highlights with descriptions and images to your profile
- Interactive Avatar Cropper β Crop and precisely adjust your profile picture before upload (2MB limit)
- Notifications & Feedback β Real-time alerts for requests and elegant toast notifications for actions
- Dashboard β Paginated view of matched users with compatibility scores
| Layer | Technology |
|---|---|
| Backend | Flask 3.1.2, Flask-Login, Flask-SQLAlchemy, Flask-Migrate |
| Real-Time | Flask-SocketIO, python-socketio, python-engineio |
| Database | SQLite (dev) / PostgreSQL (production-ready) |
| Flask-Mail with Gmail SMTP | |
| Frontend | HTML5, CSS3, JavaScript, Jinja2 Templates |
| Auth | Flask-Login + Werkzeug password hashing |
| Forms | Flask-WTF, WTForms, email-validator |
| Security | CSRF Protection, Rate Limiting, Secure Sessions |
| Migrations | Flask-Migrate (Alembic) |
| Environment | python-dotenv |
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β User ββββββΆβ Skill β β Badge β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β id β β id β β id β
β username β β name β β name β
β email β β category β β description β
β password β β type β β icon β
β bio / socialsβ β proficiency β ββββββββ¬ββββββββ
β xp / badge β β user_id (FK) β β
β profile_pic β ββββββββββββββββ ββββββββ΄ββββββββ
β rating β β UserBadge β
β timezone βββββββββββββββββββββββββββββββββββββββββββ
β created_at β ββββββββββββββββ β user_id (FK) β
ββββββββ¬ββββββββ β SwapRequest β β badge_id(FK) β
β ββββββββββββββββ β earned_at β
β β sender_id β ββββββββββββββββ
ββββββββββββββΆβ receiver_id β
β β status β ββββββββββββββββ
β β proposed_timeβ β ChatMessage β
β β completed_at ββββββΆββββββββββββββββ
β ββββββββββββββββ β swap_id (FK) β
β β sender_id β
β ββββββββββββββββ β message β
ββββββββββββββΆβ Review β β is_read β
β ββββββββββββββββ ββββββββββββββββ
β β reviewer_id β
β β reviewed_id β ββββββββββββββββ
β β rating β β Notification β
β β comment β ββββββββββββββββ
β ββββββββββββββββ β user_id (FK) β
β β message β
β ββββββββββββββββ β is_read β
ββββββββββββββΆβ PortfolioProjβ ββββββββββββββββ
β ββββββββββββββββ
β β title / desc β
β β project_url β
β ββββββββββββββββ
β
β ββββββββββββββββ
ββββββββββββββΆβ Availability β
ββββββββββββββββ
β day_of_week β
β start / end β
ββββββββββββββββ
- Python 3.9+
- pip (Python package manager)
- Gmail account with App Password (for password reset emails)
-
Clone the repository
git clone https://github.com/luckyyyroyyy/Skill-Swap.git cd Skills-Swap -
Create & activate virtual environment
python -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
cp .env.example .env
Edit
.envwith your settings:SECRET_KEY=your-secret-key-here FLASK_ENV=development DATABASE_URL=sqlite:///skillswap.db UPLOAD_FOLDER=static/profile_pics # Gmail SMTP (for password reset emails) MAIL_SERVER=smtp.gmail.com MAIL_PORT=587 MAIL_USE_TLS=True MAIL_USERNAME=your-email@gmail.com MAIL_PASSWORD=your-16-char-app-password MAIL_DEFAULT_SENDER=your-email@gmail.com
-
Initialize the database
python -m flask db upgrade
Or manually:
python -c "from app import app, db; app.app_context().push(); db.create_all()"
-
Run the application
python app.py
The app will be available at http://localhost:5000 π
Skills-Swap/
βββ app.py # Flask app, SocketIO events, context processors
βββ config.py # Config classes (Dev / Prod / Test)
βββ extensions.py # Flask extensions (DB, Login, Limiter, Mail, SocketIO)
βββ models.py # SQLAlchemy models (User, Skill, Swap, Review, etc.)
βββ forms.py # WTForms (Registration, Login, Skills, Reviews, Reset)
βββ utils.py # XP, rating, matching, badge & notification systems
βββ seed.py # Database seeding script
βββ test_app.py # Unit tests
βββ requirements.txt # Python dependencies
βββ .env.example # Environment template
βββ .gitignore # Git ignore rules
β
βββ routes/ # Blueprint modules
β βββ __init__.py # Blueprint exports
β βββ main.py # Landing page
β βββ auth.py # Register, login, logout, password reset
β βββ user.py # Profile, dashboard, skills management
β βββ swap.py # Swap requests, reviews, matching
β βββ chat.py # Real-time messaging
β
βββ templates/ # Jinja2 HTML templates
β βββ base.html # Base layout with nav & scripts
β βββ landing.html # Public landing page
β βββ register.html # Registration form
β βββ login.html # Login form
β βββ reset_password_request.html # Forgot password
β βββ reset_password.html # Password reset form
β βββ dashboard.html # Main dashboard with matches
β βββ profile.html # User profile view
β βββ edit_profile.html # Profile editor with avatar upload
β βββ my_swaps.html # Swap request management
β βββ matches.html # Skill matching results
β βββ chat.html # Real-time chat interface
β βββ notifications.html # Notification center
β
βββ static/ # Static assets
β βββ css/ # Stylesheets
β βββ js/ # JavaScript files
β βββ img/ # Images & icons
β βββ profile_pics/ # User uploaded avatars
β
βββ migrations/ # Flask-Migrate / Alembic
β βββ versions/ # Migration scripts
β βββ env.py # Migration environment
β βββ alembic.ini # Alembic configuration
β
βββ instance/ # Instance-specific files
βββ skillswap.db # SQLite database
| Method | Endpoint | Description |
|---|---|---|
GET/POST |
/register |
User registration |
GET/POST |
/login |
User login |
GET |
/logout |
Logout (auth required) |
GET/POST |
/reset_password_request |
Request password reset email |
GET/POST |
/reset_password/<token> |
Reset password with token |
| Method | Endpoint | Description |
|---|---|---|
GET |
/dashboard |
Dashboard with matched users |
GET/POST |
/profile/<username> |
View user profile |
GET/POST |
/edit_profile |
Edit profile (bio, avatar, timezone) |
POST |
/add_skill |
Add a new skill |
| Method | Endpoint | Description |
|---|---|---|
POST |
/send_swap/<user_id> |
Send swap request |
GET/POST |
/my-swaps |
View all swap requests |
GET |
/accept/<swap_id> |
Accept a swap |
GET |
/reject/<swap_id> |
Reject a swap |
GET |
/complete/<swap_id> |
Mark swap as completed |
POST |
/submit_review/<user_id> |
Submit review for user |
| Method | Endpoint | Description |
|---|---|---|
GET/POST |
/chat/<swap_id> |
Chat for a specific swap |
GET |
/notifications |
View all notifications |
| Event | Direction | Description |
|---|---|---|
join_room |
Client β Server | Join a chat room |
send_message |
Client β Server | Send a chat message |
receive_message |
Server β Client | Receive a chat message |
new_notification |
Server β Client | Real-time notification push |
| Variable | Default | Description |
|---|---|---|
SECRET_KEY |
dev-secret-key... |
Flask secret key (change in production!) |
FLASK_ENV |
development |
development / production / testing |
DATABASE_URL |
sqlite:///skillswap.db |
Database connection string |
UPLOAD_FOLDER |
static/profile_pics |
Profile picture upload path |
DEBUG |
True |
Enable debug mode |
MAIL_SERVER |
smtp.gmail.com |
SMTP server address |
MAIL_PORT |
587 |
SMTP port (587 for TLS) |
MAIL_USE_TLS |
True |
Enable TLS encryption |
MAIL_USERNAME |
β | Gmail address |
MAIL_PASSWORD |
β | Gmail App Password (16-char) |
MAIL_DEFAULT_SENDER |
β | Default "From" email address |
pip install pytest
pytest test_app.py -vTests cover:
- β User model operations
- β Skill management (CRUD)
- β Swap request lifecycle
- β Matching algorithm accuracy
- β Badge award system
- β Notification creation
- β Review system
- Set production environment variables β Use a strong
SECRET_KEY, setFLASK_ENV=production,DEBUG=False - Switch to PostgreSQL β Update
DATABASE_URLconnection string - Apply migrations β
flask db upgrade - Use a production WSGI server:
gunicorn --worker-class eventlet -w 1 --bind 0.0.0.0:8000 app:app
- Enable HTTPS with SSL/TLS certificates
- Setup monitoring (Sentry, Datadog, etc.)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- β End-to-end quality assurance (QA) validation complete
- β Verified real-time WebSocket interactions & DOM updates
- β New Feature: Weekly Availability Scheduling with timezone-aware logic
- β New Feature: Portfolio Projects and Social Links on User Profiles
- β UI/UX Polish: Interactive Avatar Cropper, UI Pagination, and stylish Toast Notifications
- β Production-ready deployment optimizations
- β Database records cleaned and reset for fresh deployment
- β Temporary logs and cache files cleaned
- β Password reset via Gmail SMTP with styled HTML emails
- β Flask-Migrate database migrations
- β Timezone-aware matching with timezone bonus
- β Skill proficiency levels (Beginner / Intermediate / Expert)
- β Fuzzy skill name matching
- β Improved error handling & user feedback
- β Core platform with auth, skills, swaps, chat
- β Gamification (XP, badges, levels)
- β Security hardening (CSRF, rate limiting, secure sessions)
- β Unit tests & logging
This project is licensed under the MIT License β see the LICENSE file for details.
For issues, suggestions, or questions:
- π§ Email: luckyyyroyyy@gmail.com
- π Open an Issue
Made with β€οΈ for skill-sharing
Β© 2026 SkillSwap Pro β Swap skills, grow together.