This repository is used for interviewing and technical screening purposes. However, the basic structure of this app can serve as an excellent basis for developing applications based on Postgres, Flask (Python), and React (ES6/Javascript).
WARNING: This repository comes as-is. Aktify does not provide support or assume liability for the use of this code. It is highly recommended that you do NOT run a production environment based on this application scaffold, without significant review and changes.
The Aktify Code Challenge is built on top of Docker and Docker Compose to ease the process of setting up multiple services and connecting them.
To get started, make sure that Docker and Docker Compose are installed correctly on your system. Then:
- Fork and clone the repository
- Add a
.env
file to the root of the repository and addEMAIL_ADDRESS=<YOUR_EMAIL_ADDRESS>
, where<YOUR_EMAIL_ADDRESS>
is replaced with any email address. - Run
docker-compose up -d
NOTE: Your OS may prompt you to allow Docker to access one of your volumes. You must grant those permissions to enable the development environment.
These commands will start, configure, and connect all of the services used in Aktify Code Challenge. These services include a database, database administration tool, API, and Web interface.
You'll benefit from a minimal knowledge of Docker and Docker Compose while using this repository.
When we started the development environment we used the -d
option. Use of the -d
option makes Docker Compose run in the background. Without this option, the logging wouldn't be very helpful. To see the log output from any of the services, simply run docker-compose logs -f <SERVICE_NAME>
(ex: docker-compose logs -f api
or docker-compose logs -f db
).
By default, Docker Compose will not rebuild a container on docker-compose up
for performance reasons. If you feel the need to alter a service's configuration in docker-compose.yml or in the service's Dockerfile, remember to rebuild the container using docker-compose up -d --build --no-deps <SERVICE_NAME>
(ex: docker-compose up -d --build api
).
The following section outlines the architecture of the Aktify Code Challenge application. While this section provides a good overview, it's also important to understand how each service is built by inspecting docker-compose.yml and the service's Dockerfile.
Aktify Code Challenge's data persistence layer is built using Postgres. Additionally, a PG Admin service is provided to ease the burden of interacting with the database.
By default the Postgres database can be found at http://localhost:5432 and PG Admin can be accessed at http://localhost:5050. The default credentials for each of these services are defined in docker-compose.yml. The ports and credentials can be overridden by adding the appropriate environment variables to the .env file that you created earlier, and in some cases by editing the PG Admin configuration file.
See services/api/README.md for more information.
See services/ui/README.md for more information.