A full-stack Todo application built with React (frontend), .NET Aspire (backend), and Vite for rapid frontend development. This repository demonstrates a modern, modular approach to building and running a multi-project solution with both web and API services.
todojsaspire/
├── LICENSE
├── src/
│ ├── package.json
│ ├── TodojsAspire.sln
│ ├── todo-frontend/ # React + Vite frontend
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── vite.config.js
│ │ └── ...
│ ├── TodojsAspire.ApiService/ # .NET Aspire API service
│ │ ├── Program.cs
│ │ ├── Todo.cs
│ │ ├── TodoDbContext.cs
│ │ ├── TodoEndpoints.cs
│ │ └── ...
│ ├── TodojsAspire.AppHost/ # .NET Aspire AppHost
│ │ ├── AppHost.cs
│ │ └── ...
│ ├── TodojsAspire.ServiceDefaults/ # Shared service defaults
│ │ └── ...
-
Frontend:
- Located in
src/todo-frontend/ - Built with React and Vite
- Handles all user interactions and communicates with the backend API
- See
src/todo-frontend/README.mdfor details
- Located in
-
Backend:
- .NET Aspire solution with multiple projects:
TodojsAspire.ApiService/: Minimal API for managing todos (CRUD, reorder, etc.)TodojsAspire.AppHost/: AppHost for orchestrating servicesTodojsAspire.ServiceDefaults/: Shared configuration and extensions
- .NET Aspire solution with multiple projects:
- .NET 8 SDK
- Node.js (v18+ recommended)
- npm or yarn
git clone <your-repo-url>
cd todojsaspirecd src
# Restore and build the solution
dotnet restore
dotnet build
# Run the AppHost (or run ApiService directly for development)
dotnet run --project TodojsAspire.AppHostcd src/todo-frontend
npm install
npm run dev
# or
yarn install
yarn devThe frontend will be available at http://localhost:5173 and will proxy API requests to the backend.
The backend exposes the following endpoints (see TodojsAspire.ApiService):
GET /api/Todo— fetch all todosPOST /api/Todo— add a new todoDELETE /api/Todo/{id}— delete a todoPOST /api/Todo/move-up/{id}— move a todo upPOST /api/Todo/move-down/{id}— move a todo down
- The solution uses Entity Framework Core for data access (see
TodoDbContext.cs). - Migrations are stored in
src/TodojsAspire.ApiService/Migrations/. - The frontend expects the backend API to be available at
/api/Todo(see Vite proxy config if needed).
This project is licensed under the terms of the MIT License.