Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

Task Manager Portal

A full-stack Node.js and Express application designed to streamline workflows between management and interns. The system utilizes role-based access control (RBAC) to serve completely isolated UIs for public visitors, supervisors, and interns from a single backend.

Features

  • Role-Based Access Control: Distinct workflows and interfaces for supervisor and intern roles.
  • Isolated Frontend Architecture: Express static routing securely serves distinct public/ directories based on the authenticated user's role.
  • Secure Authentication: Implements bcrypt for password hashing and express-session for secure, server-side memory sessions.
  • Dynamic Dashboards: Utilizes PostgreSQL aggregation queries to generate real-time performance metrics for both supervisors and interns.
  • Task Lifecycle Management: Supervisors assign and delete tasks; interns update statuses (Pending → In Progress → Completed).

Tech Stack

  • Backend: Node.js, Express.js
  • Frontend: Native HTML, CSS, Vanilla JavaScript (Fetch API)
  • Database: PostgreSQL (pg driver)
  • Security: bcrypt, express-session, dotenv

Project Structure

task-manager/
├── public/                 # Isolated frontend interfaces
│   ├── main/               # Landing page & authentication forms
│   ├── supervisor/         # Protected management dashboard
│   └── intern/             # Protected execution queue
├── src/                    # Backend architecture (MVC)
│   ├── config/             # Database connection pool
│   ├── controllers/        # Business logic and request handling
│   ├── middleware/         # Session and role-validation checks
│   ├── models/             # Database queries and aggregations
│   ├── routes/             # API endpoint definitions
│   └── app.js              # Server boot and middleware orchestration
├── .env                    # Environment variables (not tracked in git)
└── migration.sql           # PostgreSQL database schema

Getting Started

Prerequisites

1. Installation

Clone the repository and install the required dependencies:

npm install

2. Database Setup

Execute the migration script to build the schema. From the project root, run:

psql -U postgres -f migration.sql

3. Environment Configuration

Create a .env file in the root directory and configure your specific database credentials and session secret:

DB_USER=postgres
DB_HOST=localhost
DB_NAME=task_manager_db
DB_PASS=your_password
DB_PORT=5432
SESSION_SECRET=your_secure_random_string

4. Boot the Server

Start the Express server:

node src/app.js

The application will be available at http://localhost:3000. Navigate to the root URL to register a new supervisor or intern account.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages