UserServiceApp is designed to create and manage users.
Follow these steps to get started:
Docker: Ensure Docker is installed on your PC. If not, download and install it from Docker's official website.
Setup Instructions
Ensure Docker is running on your machine to proceed with the setup and for running integration tests.
Open PowerShell and navigate to the API layer directory of the project.
cd C:\yourPathToAssignment\UserServiceApp\src\UserServiceApp.API\UserServiceApp.API.csproj
Run the following command to start the database container using Docker Compose:
powershell
Copy code
docker compose -f .\docker-compose-database.yml up -d
This command runs the database in detached mode.
Run the following command to start the database container using Docker Compose:
With the database up and running, start the application. Database migrations will be applied automatically upon startup.
For API testing, you can use:
Swagger: Accessible at http://localhost:/swagger once the app is running. To enter bearer token in swagger, click the button "Authorize" (upper right corner of the UI) and enter the token in the format "Bearer "
Postman: Send requests to the application's endpoints. Use the JSON request payloads as described in the assignment instructions.
Ensure Docker is running on your machine during all types of testing (API and integration tests)!
A default admin user is created with the following credentials:
Email: admin@localhost Username: admin Password: Admin-1234!
The admin profile can be used to create new users, update user details, delete users, view user details, and promote other basic users to the admin role.
Anyone can create a new user, but its role will be set to "User" by default.
To retrieve user data (get or getAll), a valid Bearer token is required in the request header.
When registering a new user, the culture will be taken from the client's local machine automatically. It can be changed later by the administrator with the update endpoint, passed in headers as the NewUserCulture query parameter.
Log files are stored inside directory: C:/Temp/UserServiceAppLogs
Enjoy using the app! :)