Flow Unit is a robust task management and team collaboration backend built with Node.js and Express. It utilizes Mongoose for schema-driven data modeling in MongoDB and features a comprehensive system for project tracking, task delegation, and automated SMTP notifications.
- Node.js & Express: High-performance RESTful API architecture.
- MongoDB & Mongoose: Object Data Modeling (ODM) for complex data relationships between users, teams, projects, and tasks.
- JWT Authentication: Secure stateless authentication using JSON Web Tokens with session validation.
- Nodemailer: Automated transactional emails for account verification, task assignments, and project updates.
- Team Management: Robust invitation-based system allowing users to create teams and collaborate on shared projects.
- OTP System: Time-sensitive One-Time Passwords for secure account verification and password recovery.
- Clone the repository:
git clone https://github.com/youngbeeh08/flow-unit-server.git
- Install dependencies:
npm install
- Start the development server:
npm start
Create a .env file in the root directory and include the following:
MONGO_URI=mongodb://localhost:27017/flowunit
SERVER_PORT=1000
JWT_SECRET=your_jwt_secret_key
JWT_EXP=7d
SERVER_MAIL=your-email@gmail.com
SERVER_PASS=your-app-password
SERVER_SUPPORT_MAIL=support@flowunit.com
CLIENT_DOMAIN=http://localhost:5173http://localhost:1000/api
Request:
{
"name": "John Doe",
"userName": "johndoe",
"email": "john@example.com",
"password": "SecurePassword123"
}Response:
{
"status": "success",
"message": "Account created successfully"
}Errors:
- 400: Unable to create account
- 409: Username or Email already exists
Request:
Params: username (string)
Response:
{
"status": "success",
"message": "Username: johndoe is available for you to use"
}Request:
{
"email": "john@example.com",
"code": "123456"
}Response:
{
"status": "success",
"message": "Account verified successfully."
}Errors:
- 410: Code has expired
- 422: Invalid code or email
Request:
{
"userName": "johndoe",
"password": "SecurePassword123"
}Response:
{
"status": "success",
"message": "Log in successfully",
"token": "eyJhbG..."
}Errors:
- 400: Account not verified
- 422: Invalid credentials
Request:
Headers: Authorization: Bearer <token>
Response:
{
"status": "success",
"user": { ... },
"total_projects": 5,
"pending_tasks": 2,
"completed_projects": 3
}Request:
Query: type=personal OR team
{
"name": "Website Redesign",
"description": "Revamp the landing page",
"startDate": "2023-10-01",
"dueDate": "2023-12-01",
"priorityLevel": "high"
}Response:
{
"status": "success",
"project": { ... }
}Request:
{
"name": "Fix Navbar",
"description": "Repair the responsive toggle",
"dueDate": "2023-11-01",
"projectID": "64f..."
}Response:
{
"status": "success",
"task": { ... }
}Request:
{
"projectID": "64f...",
"status": "done"
}Response:
{
"status": "success",
"message": "Task completed successfully"
}Request:
{
"name": "Engineering Team",
"about": "Backend and Frontend developers"
}Response:
{
"status": "success",
"team": { ... }
}Request:
{
"invitationInfo": "Join our dev group"
}Response:
{
"status": "success",
"message": "Invitation created successfully"
}I welcome contributions to the Flow Unit API. Please follow these steps:
- Fork the project repository.
- Create a feature branch (
git checkout -b feature/NewFeature). - Commit your changes (
git commit -m 'Add some NewFeature'). - Push to the branch (
git push origin feature/NewFeature). - Open a Pull Request.
Developed by Zenith Dev.
- GitHub: youngbeeh08
- Portfolio: Bamitale Abdulazeem I.
- LinkedIn: Bamitale Abdulazeem I.