https://github.com/zayedshahcode/flexskill-server
A ExpressJS backend service for the FlexSkill application, providing user authentication, team management, and profile features.
https://github.com/zayedshahcode/flexskill-server
backend express fullstack mern node postgres
Last synced: 3 months ago
JSON representation
A ExpressJS backend service for the FlexSkill application, providing user authentication, team management, and profile features.
- Host: GitHub
- URL: https://github.com/zayedshahcode/flexskill-server
- Owner: ZayedShahcode
- Created: 2025-02-17T05:49:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-25T14:28:21.000Z (over 1 year ago)
- Last Synced: 2025-03-25T15:33:24.591Z (over 1 year ago)
- Topics: backend, express, fullstack, mern, node, postgres
- Language: JavaScript
- Homepage: https://flexskill.onrender.com
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A ExpressJS backend service for the FlexSkill application, providing user authentication, team management, and profile features.
# FlexSkill Backend
## Tech Stack
- **Node.js** - Runtime environment
- **Express** - Web framework
- **Sequelize** - ORM for database operations
- **PostgreSQL** - Database
- **bcrypt** - Password hashing
- **JWT** - Authentication tokens
## Features
- 🔐 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
## Getting Started
### Prerequisites
- Node.js (v14 or higher)
- PostgreSQL
- npm or yarn
### Installation
1. Clone the repository
```bash
git clone
cd backend
```
2. Install dependencies
```bash
npm install
# or
yarn install
```
3. Create a `.env` file in the root directory:
```env
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
```
4. Start the server
```bash
npm start
# or
yarn start
```
The server will be running at `http://localhost:4000`
## API Endpoints
### Authentication
- `POST /sign/new` - Register new user
- `POST /sign/` - Login user
- `POST /sign/verify` - Verify JWT token
- `POST /sign/logout` - Logout user
- `GET /sign/user/:id` - Get user by ID
### Teams
- `GET /team` - Get all teams
- `POST /team` - Create new team
- `POST /team/join` - Join a team
- `POST /team/leave` - Leave a team
- `GET /team/:id` - Get team members
- `DELETE /team` - Delete a team
### Dashboard
- `GET /dash/:teamId` - Get team details
## Project Structure
```
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
```
## Database Schema
### User Model
- id (Primary Key)
- username
- email
- password (hashed)
- teamId (Foreign Key)
- githubProfile
- createdAt
- updatedAt
### Team Model
- id (Primary Key)
- teamname
- teamDescription
- teamsize
- githubLink
- details
- teamLeader
- leaderName
- members (Array)
- createdAt
- updatedAt
## Contributing
1. Fork the repository
2. Create a new branch
3. Make your changes
4. Submit a pull request