Skip to content

Commit 40d0c80

Browse files
committed
Removes React client and updates docs for backend focus
Streamlines project by deleting all frontend (React) files, dependencies, and configuration, shifting focus to FastAPI backend. Updates documentation to reflect backend-only architecture and simplifies setup instructions for deployment and development. Adds VS Code settings and launch configuration for backend debugging.
1 parent 6df90fa commit 40d0c80

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+892
-8200
lines changed

.coverage

52 KB
Binary file not shown.

.vscode/launch.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Python Debugger: FastAPI",
9+
"type": "debugpy",
10+
"request": "launch",
11+
"module": "uvicorn",
12+
"cwd": "${workspaceFolder}/server",
13+
"args": [
14+
"server.web.application:get_app",
15+
"--reload"
16+
],
17+
"jinja": true
18+
}
19+
]
20+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"kiroAgent.configureMCP": "Disabled"
3+
}

README.md

Lines changed: 10 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,18 @@
1-
# Descartes Underwriting - Technical test
1+
# FastAPI Demo App
22

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-
![archi-descartes](https://github.com/valeeraZ/descartes-app/assets/39196828/c953f735-4668-4f02-87c0-b5f282a30839)
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:
564

575
1. List the existing contacts
586
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)
698

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:
7310

74-
## Comment
11+
- FastAPI for the backend with async SQLAlchemy and Alembic for migrations
12+
- PostgreSQL for the database
7513

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:
7815

79-
Testing should exist but remain minimal, just for demonstration purposes.
16+
```
17+
docker-compose up --build
18+
```

client/.eslintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

client/.gitignore

Lines changed: 0 additions & 35 deletions
This file was deleted.

client/Dockerfile

Lines changed: 0 additions & 65 deletions
This file was deleted.

client/README.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

client/next.config.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)