- Code documentation
- Function header comments
- Product documentation
- Software architecture schemas
- Database schemas
- Sequence diagram
- Technical decision log
- Visual studio community 2022
- Docker desktop
- Clone the repo
git clone https://github.com/taufikfadjar/TodoApp.git
You can choose execute using visual studio or by using docker
- Open terminal & create a new docker network
docker network create my-network
- Go to root TodoApp folder and open terminal for build web api
docker build -t webapi-todo -f ./TodoApp.WebApi/Dockerfile .
- Run docker web api for expose a port 5000 on host
docker run --name webapi-todo -p 5000:80 --network my-network -d webapi-todo
- Run migration sqllite by opening browser than hit api migrations
http://localhost:5000/api/Migration
- After finisih execute web api. Next you can execute blazor server. First make a changing configuration for API Endpoint. Open TodoApp.BlazorServer folder and edit appsettings.json.
"ApiEndPoint": "http://webapi-todo:80/"
- Go to root TodoApp folder and open terminal for build blazor
docker build -t blazor-todo -f ./TodoApp.BlazorServer/Dockerfile .
- Run docker blazor for expose a port 5001 on host
docker run --name blazor-todo -p 5001:80 --network my-network -d blazor-todo
- After finish you run on browser for doing register user at http://localhost:5001/
- Open visual studio 2022 and choose TodoApp.sln
- After visual studio was opening project. You can go to Tools > Nuget Package Manager > Package Manager Console Go root TodoApp.Model and run script on that terminal for applying sql lite db creation
cd .\TodoApp.Model
dotnet ef --startup-project ../TodoApp.WebApi/ database update
- Please check a todos.db created or not in TodoApp.WebApi
- Changing configuration for API Endpoint. Open TodoApp.BlazorServer folder and edit appsettings.json.
"ApiEndPoint": "https://localhost:7132/"
- For running two application on visual studio. You can right click on solution. Click properties and select multiple project Set action TodoApp.BlazorServer to start and set action TodoApp.WebApi to start then apply
- TodoApp.WebApi : Web api application for handle user login & registration and todo api services
- TodoApp.Service : Project contains todo business logic
- TodoApp.Model : Project contains model and dbcontext
- TodoApp.Blazor : Web apps for client which contain todo UI
- TodoApp.Test : Project test for testing web api function
-
Bussiness requirement
- User Registration: Users are able to register their user id, password, and name
- User Login: Users are able to perform authentication using user id and password before maintaining their To-Do activities.
- To-Do Creation: Users are able to input multiple Subject and Description of their To-Do activities. To-Do items should have activities_no where it is a unique sequential activities number with format “AC-XXXX” stored in the database.
- To-Do List: Users are able to see a list of their To-Do activities.
- To-Do Marking: Users are able to mark their To-Do activity to Done or Canceled, and reverse status to Unmarked.
- To-Do Modification: Users are able to modify Subject and Description of Unmarked activity.
- To-Do Deletion: Users are able to delete any Unmarked To-Do activity .
-
Use cases diagram