Leftover from merge, updated readme
This commit is contained in:
67
README.md
67
README.md
@@ -1,49 +1,26 @@
|
||||
Latest refactor from develop's branch commit 5d5cd21 2024-08-28
|
||||
|
||||
|
||||
# Endpoints
|
||||
|
||||
|
||||
| Method | ielts-be | This one |
|
||||
|--------|--------------------------------------|---------------------------------------------|
|
||||
| GET | /healthcheck | /api/healthcheck |
|
||||
| GET | /listening_section_1 | /api/listening/section/1 |
|
||||
| GET | /listening_section_2 | /api/listening/section/2 |
|
||||
| GET | /listening_section_3 | /api/listening/section/3 |
|
||||
| GET | /listening_section_4 | /api/listening/section/4 |
|
||||
| POST | /listening | /api/listening |
|
||||
| POST | /writing_task1 | /api/grade/writing/1 |
|
||||
| POST | /writing_task2 | /api/grade/writing/2 |
|
||||
| GET | /writing_task1_general | /api/writing/1 |
|
||||
| GET | /writing_task2_general | /api/writing/2 |
|
||||
| POST | /speaking_task_1 | /api/grade/speaking/1 |
|
||||
| POST | /speaking_task_2 | /api/grade/speaking/2 |
|
||||
| POST | /speaking_task_3 | /api/grade/speaking/3 |
|
||||
| GET | /speaking_task_1 | /api/speaking/1 |
|
||||
| GET | /speaking_task_2 | /api/speaking/2 |
|
||||
| GET | /speaking_task_3 | /api/speaking/3 |
|
||||
| POST | /speaking | /api/speaking |
|
||||
| POST | /speaking/generate_speaking_video | /api/speaking/generate_speaking_video |
|
||||
| POST | /speaking/generate_interactive_video | /api/speaking/generate_interactive_video |
|
||||
| GET | /reading_passage_1 | /api/reading/passage/1 |
|
||||
| GET | /reading_passage_2 | /api/reading/passage/2 |
|
||||
| GET | /reading_passage_3 | /api/reading/passage/3 |
|
||||
| GET | /level | /api/level |
|
||||
| GET | /level_utas | /api/level/utas |
|
||||
| POST | /fetch_tips | /api/training/tips |
|
||||
| POST | /grading_summary | /api/grade/summary |
|
||||
| POST | /grade_short_answers | /api/grade/short_answers |
|
||||
| POST | /upload_level | /api/level/upload |
|
||||
| POST | /training_content | /api/training/ |
|
||||
| POST | /custom_level | /api/level/custom |
|
||||
|
||||
# Run the app
|
||||
|
||||
This is for Windows, creating venv and activating it may differ based on your OS
|
||||
1. pip install poetry
|
||||
2. poetry install
|
||||
3. python app.py
|
||||
|
||||
1. python -m venv env
|
||||
2. env\Scripts\activate
|
||||
3. pip install poetry
|
||||
4. poetry install
|
||||
5. python app.py
|
||||
# Modules
|
||||
|
||||
- api -> endpoints
|
||||
- configs -> app configs and constants
|
||||
- controllers -> meant for handling exceptions, transforming data or orchestrate complex use cases with several services, for now mostly just calls services directly
|
||||
- dtos -> pydantic models used for receiving data and for validation
|
||||
- exceptions -> if custom exceptions are needed to throw in services so they can be handled in the controllers to construct some specific http response
|
||||
- helpers -> a bunch of lightweight functions grouped by some kind of logic
|
||||
- mappers -> to map complex data
|
||||
- middlewares -> classes that are run before executing the endpoint code
|
||||
- repositories -> interfaces with data stores
|
||||
- services -> all the business logic goes here
|
||||
- utils -> loose functions used on one-off occasions
|
||||
|
||||
# Dependency injection
|
||||
|
||||
If you want to add new controllers/services/repositories you will have to change
|
||||
app/configs/dependency_injection.py
|
||||
|
||||
Also make sure you have @inject on your endpoint when calling these.
|
||||
|
||||
Reference in New Issue
Block a user