Deadline: Sunday, Feb 23th 11:59 pm PST
Task Manager Application
This repository contains a Task Management application built with a React (TypeScript) frontend and a Node.js (Express, TypeScript) backend using PostgreSQL as the database.
-
User Authentication:
- Registration and login endpoints with secure password hashing (bcrypt)
- JWT-based authentication
-
Task Management:
- Create, update, view, and delete tasks
- Tasks are tied to the authenticated user
-
Frontend UI:
- Responsive React app with a table view of tasks
- Radio button selection to choose a single task for editing or deletion
- Modal popup for creating and editing tasks
lumaa-spring-2025-swe/
├── backend/
│ ├── src/
│ │ ├── controllers/
│ │ │ ├── authController.ts
│ │ │ └── taskController.ts
│ │ ├── middleware/
│ │ │ └── authMiddleware.ts
│ │ ├── utils/
│ │ │ └── db.ts
│ │ └── server.ts
│ ├── migrations.sql
│ ├── .env
│ ├── package.json
│ └── tsconfig.json
├── frontend/
│ ├── src/
│ │ ├── context/
│ │ │ └── AuthContext.tsx
│ │ ├── pages/
│ │ │ ├── LoginPage.tsx
│ │ │ ├── RegisterPage.tsx
│ │ │ └── TasksPage.tsx
│ │ ├── App.tsx
│ │ └── index.tsx
│ ├── .env
│ ├── package.json
│ └── tsconfig.json
└── README.md
-
Windows:
Download the installer from the PostgreSQL official website and follow the installation instructions. -
macOS:
brew install postgresql brew services start postgresql
-
Linux:
sudo apt update sudo apt install postgresql postgresql-contrib sudo systemctl start postgresql
-
Open Command Prompt (or terminal) and run:
psql -U postgres
When prompted, enter your PostgreSQL password.
-
Create the database:
CREATE DATABASE task_manager_db;
A migration file (migrations.sql
) is provided in the /backend
directory. It contains SQL commands to create the necessary tables.
-
Open a Command Prompt and navigate to the
/backend
directory. -
Run the migration using:
"C:\Program Files\PostgreSQL\17\bin\psql" -U postgres -d task_manager_db -f migrations.sql
Adjust the path to
psql
if necessary.
In the /backend
directory, create a .env
file with the following:
PORT=5000 DATABASE_URL=postgresql://postgres:your_password@localhost:5432/task_manager_db JWT_SECRET=your_jwt_secret_here
- Replace
your_password
with your actual PostgreSQL password. - Replace
your_jwt_secret_here
with a secure secret key for JWT.
In the /frontend
directory, create a .env
file with the following:
REACT_APP_API_URL=http://localhost:5000
-
Open a terminal and navigate to the
/backend
folder. -
Install dependencies:
npm install
-
Start the backend server:
npm run dev
The backend will run on http://localhost:5000.
-
Open a terminal and navigate to the
/frontend
folder. -
Install dependencies:
npm install
-
Start the frontend development server:
npm start
The frontend will run on http://localhost:3000.
-
Backend Testing:
Use tools like Postman or Insomnia to test the API endpoints:- Registration: POST to
http://localhost:5000/auth/register
- Login: POST to
http://localhost:5000/auth/login
- Tasks CRUD: Test GET, POST, PUT, and DELETE on
http://localhost:5000/tasks
(ensure to pass the JWT in the Authorization header).
- Registration: POST to
-
Frontend Testing:
- Register a new user and log in through the UI.
- Test creating, editing, and deleting tasks using the provided modal popup.
- Verify that the tasks table correctly allows single task selection for edit and deletion.
-
CORS:
The backend is configured with CORS (using thecors
middleware) to allow requests from http://localhost:3000. -
TypeScript:
Both backend and frontend projects are built with TypeScript for improved type safety.
- I do not have any salary expectation in specific because I value gaining experience over monetary compensation. However, I am open to any flexible with any compensation package that aligns with the company’s standards and the current market.