Notification Management System For Authenticated Users
- Create new Users with their Pokemon Ids
- Get User list
- Get User by Id and also gathering Pokemon Names from Poke API
- Update User
- Delete User
- Docker installed without SUDO Permission
- Docker compose installed without SUDO
- Ports free: 3000 and 5432
- Create or review the
.envfile in the project root. This repository already includes one with the database values used by Docker Compose. - Start the backend and database with Docker Compose:
docker compose -f docker-compose.yaml up -d --build- Wait until both containers are running:
docker compose -f docker-compose.yaml ps- Open the API in your browser:
- Swagger UI:
http://localhost:5062/swagger - Health/sample endpoint:
http://localhost:5062/hello - Users endpoint:
http://localhost:5062/api/User
- Start the React client locally in a second terminal:
cd src/client
npm install
npm run dev- Open the frontend at
http://localhost:5173.
Notes:
- The frontend calls the API on
http://localhost:5062by default. - The API applies Entity Framework migrations and seeds the database automatically on startup.
- Required ports for the default setup are
5173,5062, and5432.
- Make sure PostgreSQL is available on
localhost:5432.
If you want to use Docker for the database only:
docker compose -f docker-compose.yaml up -d postgres- Run the integration test project from the repository root:
dotnet test tests/TakeHomeChallenge.IntegrationTests/TakeHomeChallenge.IntegrationTests.csprojNotes:
- The tests use a separate database named
TakeHomeChallengeDB_Test. - The test suite recreates that database automatically and mocks the external Pokemon API.
dotnet runis not required before running tests.
- .NET: 8.0
- React: 19.2.0
- Entity Framwework :
- Postgres>
- Testing: xUnit.net 2.9.3
- Clean Architecture: To be able to handle further changes in the future in a proper way.
- EntityFramework: Because it is the already integrated ORM in the .NET Framework and it is the most popular ORM so it is easy to find fixes and people that know how to use it
- Docker: To make portable
- xUnit/Testing/E2E: xUnit is the most used testing framework of .NET. Same argument as above. E2E testing was done because it is useless to always test every single part. That's why if the controller provide the proper answer the test has passed.
- Migrations are useds over Sincronize
- Local: API Swagger
To find an example of the values you can use .env.example