Skip to content

Sarabostani/todo-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Todo Task Application

A full-stack todo list application with a .NET Core backend API and React frontend.

Project Structure

  • TodoApi/ - .NET Core backend API with SQLite database
  • todo-ui/ - React frontend built with Vite

Backend Setup (.NET Core API)

Prerequisites

  • .NET SDK 5.0 or later
  • SQLite

Database Setup

The application uses SQLite and Entity Framework Core. The database will be automatically created on first run, but you can also initialize it manually:

  1. Navigate to the API directory:
cd TodoApi
  1. Create and apply migrations:
dotnet ef migrations add InitialCreate
dotnet ef database update

Building and Running the API

  1. Build the project:
cd TodoApi
dotnet build
  1. Run the API:
dotnet run

The API will be available at http://localhost:5000 by default.

Frontend Setup (React)

Prerequisites

  • Node.js (LTS version)
  • npm or yarn

Installation and Running

  1. Install dependencies:
cd todo-ui
npm install
  1. Start the development server:
npm run dev

The frontend will be available at http://localhost:5173.

Running the Complete Application

  1. Start the backend API (in one terminal):
cd TodoApi
dotnet run
  1. Start the frontend (in another terminal):
cd todo-ui
npm run dev
  1. Access the application at http://localhost:5173

API Endpoints

The following endpoints are available:

  • GET /api/todo - Get all todo items
  • GET /api/todo/{id} - Get a specific todo item
  • POST /api/todo - Create a new todo item
  • PUT /api/todo/{id} - Update a todo item
  • DELETE /api/todo/{id} - Delete a todo item

Development

Backend Development

  • The API uses Entity Framework Core with SQLite
  • Controllers are in TodoApi/Controllers
  • Database context and models are in TodoApi/Data and TodoApi/Models
  • Business logic is in TodoApi/Services

Frontend Development

  • React components are in todo-ui/src/components
  • Uses Material-UI for styling
  • Axios for API communication

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published