A full-stack Todo application built with modern web technologies following best practices.
āāā frontend/ # SvelteKit application
ā āāā src/
ā ā āāā routes/ # SvelteKit routes
ā ā āāā lib/ # Shared components and utilities
ā ā āāā app.html # App template
ā āāā package.json
āāā backend/ # HapiJS server
ā āāā src/
ā ā āāā routes/ # API routes
ā ā āāā handlers/ # Route handlers
ā ā āāā models/ # Data models
ā ā āāā server.js # Server configuration
ā āāā package.json
āāā README.md
Clone the repository:
git clone <repository-url>
cd ToDo-svelte-hapi
Install backend dependencies:
cd backend
npm install
Install frontend dependencies:
cd ../frontend
npm install
Start the development servers:
Backend (runs on http://localhost:3000):
cd backend
npm run dev
Frontend (runs on http://localhost:5173):
cd frontend
npm run dev
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/todos |
Get all todos |
| POST | /api/todos |
Create a new todo |
| PUT | /api/todos/{id} |
Update a todo |
| DELETE | /api/todos/{id} |
Delete a todo |
{
"id": "unique-id",
"title": "Todo title",
"description": "Todo description",
"completed": false,
"createdAt": "2023-10-28T00:00:00.000Z",
"updatedAt": "2023-10-28T00:00:00.000Z"
}