Skip to content

tushar-2301/Project_Camp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Camp Backend

A RESTful backend for Project Camp, built with Node.js, Express, and MongoDB. It provides secure authentication, project management, task management, role-based access control, and email-based account workflows.


Features

  • JWT Authentication (Access & Refresh Tokens)
  • Email Verification
  • Forgot & Reset Password
  • Project CRUD Operations
  • Task & Subtask Management
  • Notes Management
  • Role-Based Project Member Management
  • Request Validation
  • Cookie-Based Authentication
  • Centralized Error Handling

Tech Stack

  • Node.js
  • Express.js
  • MongoDB + Mongoose
  • JWT
  • Nodemailer
  • Multer
  • Express Validator

Prerequisites

  • Node.js (v18+ recommended)
  • MongoDB (Local or Atlas)
  • npm

Installation

Clone the repository and install dependencies:

git clone <repository-url>
cd project_camp
npm install

Environment Variables

Create a .env file in the project root.

API_KEY =
PORT=8000

CORS_ORIGIN = *

MONGO_URL=<your_mongodb_connection_string>

ACCESS_TOKEN_SECRET=<your_access_secret>
ACCESS_TOKEN_EXPIRY = '12h'

REFRESH_TOKEN_SECRET=<your_refresh_secret>
REFRESH_TOKEN_EXPIRY = '2d'

SERVER_URL=http://localhost:8000

FORGOT_PASSWORD_REDIRECT_URL = http://localhost:8000/forgot-password

MAILTRAP_SMTP_HOST=
MAILTRAP_SMTP_PORT=
MAILTRAP_SMTP_USER=
MAILTRAP_SMTP_PASS=

SERVER_URL = ""

Running the Application

Start the development server:

npm run dev

Start the production server:

npm start

The server will be available at:

http://localhost:8000

Project Structure

src/
├── controllers/
├── middlewares/
├── models/
├── routes/
├── utils/
├── db/
├── constants/
└── index.js

API Modules

Authentication

  • Register
  • Login
  • Logout
  • Refresh Access Token
  • Verify Email
  • Resend Verification Email
  • Forgot Password
  • Reset Password
  • Get Current User

Projects

  • Create Project
  • Get Projects
  • Update Project
  • Delete Project
  • Manage Project Members
  • Update Member Roles

Tasks

  • Create Task
  • Update Task
  • Delete Task
  • Manage Subtasks

Notes

  • Create, Update, Delete Notes

Health Check

  • Verify server status

Available Scripts

npm install      # Install dependencies

npm run dev      # Start development server using Nodemon

npm start        # Start production server

Authentication

Protected routes require a valid JWT Access Token. Authentication tokens are issued during login and managed using HTTP cookies.


About

First Backend Project : A project management system with user authentication systems using JWT

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors