A modern React-based skill-sharing platform that connects people through knowledge exchange.
skillswap-react/
├── backend/ # Flask API backend
│ ├── app.py # Main Flask application
│ ├── requirements.txt # Python dependencies
│ └── uploads/ # File uploads directory
├── frontend/ # React frontend
│ ├── public/ # Static assets
│ ├── src/
│ │ ├── components/ # Reusable React components
│ │ │ ├── Navbar.js
│ │ │ ├── Footer.js
│ │ │ └── Chat.js
│ │ ├── contexts/ # React contexts
│ │ │ ├── AuthContext.js
│ │ │ └── NotificationContext.js
│ │ ├── pages/ # Page components
│ │ │ ├── Home.js
│ │ │ ├── Login.js
│ │ │ ├── Register.js
│ │ │ ├── Dashboard.js
│ │ │ ├── Profile.js
│ │ │ ├── Search.js
│ │ │ ├── ViewProfile.js
│ │ │ ├── Notifications.js
│ │ │ └── AdminDashboard.js
│ │ ├── App.js # Main App component
│ │ ├── App.css # Global styles
│ │ └── index.js # Entry point
│ ├── package.json # Node.js dependencies
│ └── package-lock.json
└── README.md # This file
- User Authentication: Secure login/register with JWT tokens
- Skill Management: Add, edit, and manage offered/wanted skills
- Skill Search: Find and filter skills by various criteria
- Swap Requests: Request skill exchanges with other users
- User Profiles: Comprehensive user profiles with ratings
- Real-time Chat: Communication between users
- Notifications: System notifications and alerts
- Admin Panel: Administrative controls and moderation
- Modern React: Built with React 18+ and functional components
- Responsive Design: Mobile-first responsive UI with Bootstrap 5
- State Management: Context API for global state management
- Routing: React Router for client-side navigation
- HTTP Client: Axios for API communication
- Authentication: JWT-based authentication with automatic token refresh
- Error Handling: Comprehensive error handling and user feedback
- Loading States: Proper loading indicators throughout the app
- React 18+: Modern React with hooks and functional components
- React Router: Client-side routing
- Bootstrap 5: Responsive UI framework
- Font Awesome: Icon library
- Axios: HTTP client for API requests
- Context API: State management
- Flask: Python web framework
- Flask-JWT-Extended: JWT authentication
- Flask-CORS: Cross-origin resource sharing
- SQLite: Database
- Werkzeug: Password hashing and file handling
- Node.js (v16 or higher)
- Python (v3.8 or higher)
- npm or yarn
Windows Users:
# Double-click start.bat or run in terminal:
start.batMac/Linux Users:
chmod +x start.sh
./start.sh-
Navigate to the backend directory:
cd backend -
Install Python dependencies:
pip install -r requirements.txt
-
Run the Flask development server:
python app.py
The backend API will be available at http://localhost:5000
-
Navigate to the frontend directory:
cd frontend -
Install Node.js dependencies:
npm install
-
Start the React development server:
npm start
The frontend will be available at http://localhost:3000
Run the backend test script:
python test_backend.pyIf you encounter issues, see TROUBLESHOOTING.md for detailed solutions.
- Email: admin@skillswap.com
- Password: admin123
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current user
GET /api/users- Get all users (with pagination and filters)GET /api/users/:id- Get user profilePUT /api/users/:id- Update user profile
GET /api/skills- Get user's skillsPOST /api/skills- Add new skillPUT /api/skills/:id- Update skillDELETE /api/skills/:id- Delete skillGET /api/skills/search- Search skills
GET /api/swap-requests- Get user's swap requestsPOST /api/swap-requests- Create swap requestPUT /api/swap-requests/:id- Update swap request status
GET /api/notifications- Get user notificationsPUT /api/notifications/:id/read- Mark notification as read
- Components: Reusable UI components in
/src/components/ - Pages: Full page components in
/src/pages/ - Contexts: React contexts for global state in
/src/contexts/ - Styles: Global CSS in
App.css, component-specific styles inline
- AuthContext: Manages user authentication state
- NotificationContext: Manages toast notifications and alerts
- Bootstrap 5: Primary UI framework
- Custom CSS: Additional styling in
App.css - CSS Variables: Consistent color scheme and spacing
-
Build the production version:
npm run build
-
Deploy the
build/directory to your web server
- Set up a production WSGI server (e.g., Gunicorn)
- Configure environment variables for production
- Set up a production database (PostgreSQL recommended)
- Configure reverse proxy (Nginx recommended)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For support and questions, please open an issue on the GitHub repository.