|
1 | | -# Descartes Underwriting - Technical test |
| 1 | +# FastAPI Demo App |
2 | 2 |
|
3 | | -This project template using ReactJS & Python that can be used for Descartes Underwriting technical test. |
4 | | - |
5 | | -To install and run this project: |
6 | | - |
7 | | -``` |
8 | | -docker-compose up --build |
9 | | -``` |
10 | | - |
11 | | -The first install and run will take a while, because it will install all the dependencies and build the images. |
12 | | -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
13 | | - |
14 | | -To run separately the server or client, please see the README.md in the server and client folders. |
15 | | - |
16 | | -# Demo |
17 | | - |
18 | | -https://github.com/valeeraZ/descartes-app/assets/39196828/ec9373bd-5797-46e6-94e8-e57cddd863ba |
19 | | - |
20 | | - |
21 | | -# Architecture |
22 | | - |
23 | | - |
24 | | - |
25 | | -The server is a FastAPI application that uses a PostgreSQL database. The client is a React application with Next.js that uses the server API. |
26 | | - |
27 | | -For the server, the FastAPI uses a router to handle the requests. The router uses a query service and a command service to handle the business logic with the contact read model and write model. The service uses a repository to access a PostgreSQL database by CRUD actions with SQLAlchemy models. |
28 | | - |
29 | | -# CI/CD |
30 | | - |
31 | | - |
32 | | -The CI/CD is done with Github Actions. The workflow is triggered on push and pull request on the main branch. The workflow will run the unit tests and the linter of the code in server. |
33 | | - |
34 | | -# Instructions |
35 | | - |
36 | | -## Submission |
37 | | - |
38 | | -The solution to this test (source and test codes) should be saved on a private `descartes-app` repository on your github account. |
39 | | - |
40 | | -Access should be granted to: |
41 | | - |
42 | | -- [https://github.com/alexandreCameron](https://github.com/alexandreCameron) |
43 | | -- [https://github.com/f-combes](https://github.com/f-combes) |
44 | | -- [https://github.com/achilleas-michos](https://github.com/achilleas-michos) |
45 | | -- [https://github.com/michelclet](https://github.com/michelclet) |
46 | | - |
47 | | -## Duration |
48 | | - |
49 | | -Preparing the test should take 3 to 5 hours. |
50 | | - |
51 | | -## Task |
52 | | - |
53 | | -Create a simple 3-tier application to manage contacts. |
54 | | - |
55 | | -The application should allow the user to: |
| 3 | +This is a simple 3-tier application to manage contacts. The application allows the user to: |
56 | 4 |
|
57 | 5 | 1. List the existing contacts |
58 | 6 | 2. View the details of a contact |
59 | | -3. Create a new contact (fields: first name, last name, job, address, question) |
60 | | - |
61 | | -Technology stack recommended: |
62 | | - |
63 | | -1. React for the frontend |
64 | | -2. Python for the backend (e.g. fastapi, flask) |
65 | | -3. Database (any type that can store this type of data) |
66 | | -4. Docker files and docker compose |
67 | | - |
68 | | -The project should contain: |
| 7 | +3. Create a new contact (fields: first name, last name, job, address) |
69 | 8 |
|
70 | | -1. `README.md` with the commands to install and run the app locally |
71 | | -2. A diagram of the architecture (component and interaction) |
72 | | -3. A minimal CI/CD to check the code quality before integration on main branch |
| 9 | +It is built with: |
73 | 10 |
|
74 | | -## Comment |
| 11 | +- FastAPI for the backend with async SQLAlchemy and Alembic for migrations |
| 12 | +- PostgreSQL for the database |
75 | 13 |
|
76 | | -Anything that is not listed in the task section does not have to be developed. |
77 | | -No need to bother with access management, signing etc. |
| 14 | +To install and run this project: |
78 | 15 |
|
79 | | -Testing should exist but remain minimal, just for demonstration purposes. |
| 16 | +``` |
| 17 | +docker-compose up --build |
| 18 | +``` |
0 commit comments