A simple task management application built with Vite.js, Express, and SQLite. This project allows you to manage tasks with states such as "done," "pending," and "on-hold."
- Node.js
- npm (Node Package Manager)
git clone https://github.com/Okazakee/task-mngr-fullstack.git
cd task-mngr-fullstack
npm install
Create a .env
file in the root directory with the following content:
PORT=3000
DATABASE_URL=path/to/your/database/file
Run the database initialization script:
npx ts-node src/db/init.ts
npm start
The server will start on http://localhost:3000
.
-
GET /api/tasks
Retrieve all tasks.
-
POST /api/tasks
Add a new task. Requires a JSON body with
text
andstatus
:{ "text": "Task description", "status": "pending" }
-
PUT /api/tasks/:id
Update an existing task. Requires a JSON body with
text
andstatus
:{ "text": "Updated task description", "status": "done" }
-
DELETE /api/tasks/:id
Delete a task by its ID.
The frontend for this project is a React application that interacts with the API. Ensure you have the frontend dependencies installed and start the development server:
cd frontend
npm install
npm start
The database schema includes a single table tasks
with the following columns:
id
: INTEGER PRIMARY KEY AUTOINCREMENTtext
: TEXT NOT NULLstatus
: TEXT NOT NULL (CHECK constraint to ensure values are 'done', 'pending', or 'on-hold')