Welcome to the programming exercise for Golang Backend Developers! :)
Your task is to implement a very simple account management microservice using Golang. It should at least be able to:
- Register new users using their email address, password, and name
- Log the user in using their email address and password
- Retrieve a list of all active users
- Change a user's name
- Delete a user
You should include some unit tests. Please use this repository as a starting point for your implementation and employ appropriate best practices.
As the functional requirements set above should be trivial to implement, we focus our evaluation on the quality of your code and architecture. Generally, your goal is to get the service as close as possible to a production-ready state. This could, for example, include adding:
- Proper logging capabilities
- Metrics export to Prometheus
- Health checks for Kubernetes
- Install Golang, Make and Docker.
- After cloning the repository, run
make
to verify you can build the Go app. - Run
make database-up
to start the development database in a Docker container. - Start the application using
make run
. - Happy coding!
The app exposes the REST API on port 8080
.
If you would like to drop the database and its contents, run make database-down
and then make database-up
again to start with a clean database.
If you would like to perform your SQL migrations, run make -C tasks/migrate up
, and to roll them back, make -C tasks/migrate down
.
Please take a look into the Makefile
to see all available operations.
The contents of this repo are structured in the following way:
app/
: The application source filesaccount/
: The package containing theaccount
domain model and business logicstorage/
: The package implementing persistend storage in PostgreSQLweb/
: The package exposing REST API for account management
tasks/migrate/
: The source code and .sql files required for database migrationsbin/
: Build artifacts (excluded from version control)
In case of any questions or problems you may have, please reach out to me at marcin.praski@immunkarte.de.