A ExpressJS backend service for the FlexSkill application, providing user authentication, team management, and profile features.
- Node.js - Runtime environment
- Express - Web framework
- Sequelize - ORM for database operations
- PostgreSQL - Database
- bcrypt - Password hashing
- JWT - Authentication tokens
- 🔐 User Authentication
- Registration
- Login/Logout
- JWT-based session management
- 👥 User Management
- Profile creation and updates
- GitHub profile integration
- User search and retrieval
- 🤝 Team Operations
- Team creation
- Member management
- Team discovery
- 🔒 Secure password handling
- 🎯 RESTful API endpoints
- Node.js (v14 or higher)
- PostgreSQL
- npm or yarn
- Clone the repository
git clone <repository-url>
cd backend- Install dependencies
npm install
# or
yarn install- Create a
.envfile in the root directory:
PORT=4000
DB_NAME=your_database_name
DB_USER=your_database_user
DB_PASSWORD=your_database_password
DB_HOST=localhost
JWT_SECRET=your_jwt_secret- Start the server
npm start
# or
yarn startThe server will be running at http://localhost:4000
POST /sign/new- Register new userPOST /sign/- Login userPOST /sign/verify- Verify JWT tokenPOST /sign/logout- Logout userGET /sign/user/:id- Get user by ID
GET /team- Get all teamsPOST /team- Create new teamPOST /team/join- Join a teamPOST /team/leave- Leave a teamGET /team/:id- Get team membersDELETE /team- Delete a team
GET /dash/:teamId- Get team details
backend/
├── controllers/ # Request handlers
├── middlewares/ # Custom middleware functions
├── model/ # Database models
├── routes/ # API routes
├── utils/ # Helper functions
├── app.js # Express app setup
└── server.js # Entry point
- id (Primary Key)
- username
- password (hashed)
- teamId (Foreign Key)
- githubProfile
- createdAt
- updatedAt
- id (Primary Key)
- teamname
- teamDescription
- teamsize
- githubLink
- details
- teamLeader
- leaderName
- members (Array)
- createdAt
- updatedAt
- Fork the repository
- Create a new branch
- Make your changes
- Submit a pull request