Skip to content

Repository files navigation

Task API Server

This repository contains the code for the CS 453 / 553 Project.

This is a task server that supports the following routes:

Method Route Description
POST /auth/register Create a new new user
POST /auth/login Login a user
Get /tasks Returns all tasks
POST /tasks Create a new task
GET /tasks/:id Create a new task
PATCH /tasks/:id Update an existing task
DELETE /tasks/:id Delete an existing task
Get /projects Returns all projects
POST /projects Create a new project
GET /projects/:id Create a new project
PATCH /projects/:id Update an existing project
DELETE /projects/:id Delete an existing project

Starting Services

Database

This project uses PostgreSQL running in Docker.

Setting up the database

docker compose up -d
or 
npm run db:start

Stop the database

docker compose down 
or 
npm run db:stop

Reset the database completely

docker compose down -v
or 
npm run db:reset

Default connection settings

  • Database: cs453
  • User: postgres
  • Password: postgres
  • Port: 5432
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/cs453

Creating tables

Run the schema file against the local database after PostgreSQL is running:

psql postgresql://postgres:postgres@localhost:5432/cs453 -f database/schema.sql

To start the server

npm install
npm run -prefix apps/api start

Admins can:

  • delete projects
  • alter any project or task
  • get any project or task

Testing

Automated tests are provided in apps/client/client.sh.

cd apps/client
./client.sh

Be sure to install jq to parse JSON in bash.


Project Overview

The semester project is a Task / Project Management System.

The application allows users to:

  • create projects
  • create tasks within projects
  • assign tasks to users
  • track task status
  • comment on tasks
  • view project activity

This domain is intentionally simple so that the focus remains on system architecture and communication between components, rather than complex business logic.


Architecture Overview

The system follows a typical web architecture.

Browser Client
|
v
REST API
|
v
PostgreSQL

Over the semester, the architecture will evolve to include additional components such as authentication services, real-time communication, and potentially additional APIs.

Example extended architecture:

Browser Client
|
v
API Layer
/
Auth API Task API
|
v
PostgreSQL

Technology Stack

The default project stack is:

Server

  • Node.js
  • TypeScript
  • Express

Database

  • PostgreSQL

Development Tools

  • Docker (for database)
  • npm
  • Git

Students who prefer Python may implement the server using FastAPI, but all examples and starter code will use TypeScript.


Repository Structure

cs453-project-template
│
├── apps
│ ├── api
│ │ Server-side application
│ │
│ └── client
│ Simple browser client
│
├── database
│ Database schema, migrations, and seed data
│
├── docs
│ Architecture documentation
│
├── scripts
│ Utility scripts for development
│
├── docker-compose.yml
│ Starts PostgreSQL database
│
└── README.md

Development Setup

1. Clone the repository

git clone <your-repository-url>
cd cs453-project-template

2. Start the database

This project uses Docker to run PostgreSQL locally.

docker-compose up -d

This will start a PostgreSQL database container.


3. Install dependencies

cd apps/api
npm install

4. Run the server

npm run dev

The API server should start locally.


Project Milestones

The project will evolve over several milestones during the semester.

Milestone 1 – REST API

Students will implement:

  • REST endpoints
  • database integration
  • CRUD operations
  • request validation

Milestone 2 – Authentication

Students will add:

  • user accounts
  • password hashing
  • login endpoints
  • JWT authentication
  • protected routes

Milestone 3 – Architectural Extensions

Students will extend the system with at least one of the following:

  • WebSockets for real-time updates
  • GraphQL API
  • multi-service architecture
  • asynchronous messaging
  • advanced API documentation

Graduate students will complete an additional architecture extension and design analysis.


Learning Goals

By completing this project students should understand:

  • how client/server systems communicate
  • how APIs are designed and implemented
  • how databases integrate with web services
  • how authentication works in distributed systems
  • how modern web architectures evolve over time

Academic Integrity

All work submitted for this project must be your own.

Students may use documentation and external references, but copying code from other students or online repositories is considered academic misconduct.


License

This repository is provided for educational use in CS453/553.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages