Skip to content

Commit f6bfe1f

Browse files
committed
Feat: Simplified Documentation 📖
1 parent 5474891 commit f6bfe1f

File tree

2 files changed

+93
-78
lines changed

2 files changed

+93
-78
lines changed

Architecture.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
```
2+
├── .devcontainer <- Folder for the devcontainer configuration files and Dockerfile & Docker Compose files
3+
| ├── node-container <- Folder for the NodeJS + Typescript devcontainer configuration files and Dockerfile & Docker Compose files
4+
│ | └─── .devcontainer.json <- Devcontainer configuration file for the NodeJS + Typescript devcontainer
5+
│ └─── python-container <- Dockerfile for the devcontainer
6+
| └─── .devcontainer.json <- Devcontainer configuration file for the Python devcontainer
7+
8+
├── data <- Data directory
9+
│ ├── external <- Data from third-party sources
10+
│ ├── interim <- Intermediate transformed data
11+
│ ├── processed <- Final, canonical data sets for modeling
12+
│ └── raw <- Original, immutable data dump
13+
14+
├── notebooks <- Jupyter notebooks
15+
16+
├── reports <- Generated analysis as HTML, PDF, LaTeX, etc.
17+
│ └── figures <- Generated graphics and figures for reporting
18+
19+
├── node-src <- Source code for the NodeJS application
20+
│ ├── public <- Static files for the application
21+
22+
├── python-src <- Source code for the python application
23+
│ ├── __init__.py <- Makes app a Python module
24+
│ ├── main.py <- Main application file for FastAPI
25+
│ ├── api <- Configuration file for FastAPI
26+
│ │ ├── api_v1 <- API version 1
27+
│ │ │ ├── __init__.py <- Makes api_v1 a Python module
28+
│ │ │ ├── upload.py <- API endpoint for uploading data
29+
│ │ │ └── restaurants.py <- Example API endpoint for restaurants (if extending the application)
30+
│ │ └── api.py <- API endpoints for the application
31+
│ │
32+
│ ├── crud <- CRUD (Create, Read, Update, Delete) operations folder
33+
| | ├── __init__.py <- Makes crud a Python module
34+
│ │ ├── base.py <- Base CRUD operations
35+
│ │ └── crud_restaurants.py <- CRUD operations for restaurants (if extending the application)
36+
│ │
37+
│ ├── schema <- SQLModel models for the application
38+
│ │ ├── __init__.py <- Makes schema a Python module
39+
│ │ ├── deck.py <- SQLModel model for decks
40+
│ │ └── card.py <- SQLModel model for cards
41+
│ │
42+
│ ├─── utils <- Scripts for importing data and creating the database
43+
│ | ├── config.py <- Configuration file for the application that loads environment variables
44+
│ | └── deps.py <- Dependency file for the application that creates the database connection
45+
│ |
46+
| └─── requirements.txt <- Requirements file for reproducing the analysis environment
47+
|
48+
├── env.example <- Environment variables for the application
49+
└── docker-compose.yml <- Docker Compose file for the Project
50+
```

README.md

+43-78
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,60 @@
11
# Master's Thesis Project
22

3-
This repository contains the code for my Master's Thesis Project. The project is a FastAPI application that will allow users to upload files, it will then process the files and load the data into a PostgresDB, S3 and return the data to the user. The application is built using the FastAPI framework and uses SQLModel to create the database models. The application is built using a Dev Container which will allow the application to be run locally and in Github Codespaces.
4-
5-
Project Organization
6-
------------
7-
8-
├── LICENSE
9-
├── README.md <- The top-level README for developers using this project.
10-
├── assets <- Images used in the README.md file
11-
|
12-
├── .devcontainer <- Folder for the devcontainer configuration files and Dockerfile & Docker Compose files
13-
│   ├── Dockerfile <- Dockerfile for the devcontainer
14-
│   ├── devcontainer.json <- Devcontainer configuration file
15-
│   └── docker-compose.yml <- Docker Compose file for the devcontainer
16-
17-
├── data
18-
│   ├── external <- Data from third party sources.
19-
│   ├── interim <- Intermediate data that has been transformed.
20-
│   ├── processed <- The final, canonical data sets for modeling.
21-
│   └── raw <- The original, immutable data dump.
22-
23-
├── notebooks <- Jupyter notebooks.
24-
25-
├── reports <- Generated analysis as HTML, PDF, LaTeX, etc.
26-
│   └── figures <- Generated graphics and figures to be used in reporting.
27-
|   └── template.tex <- To compile the LaTeX document into a PDF report, ensure that the PDFs generated in "figures" are placed in the same directory as main .tex file.
28-
29-
├── app <- Source code for use in this project.
30-
│   ├── __init__.py <- Makes app a Python module
31-
| ├── main.py <- Main application file for FastAPI application
32-
│   ├── api <- Configuration file for FastAPI application
33-
| | ├── api_v1
34-
| | | ├── __init__.py <- Makes api_v1 a Python module
35-
| | | ├── upload.py <- API endpoint for uploading data
36-
| | | └── restaurants.py <- API endpoint for restaurants an example endpoint if we wanted to extend the application
37-
│   │   └── api.py <- API endpoints for the application
38-
│ │
39-
│   ├── crud <- The CRUD (Create, Read, Update, Delete) operations folder for the application
40-
│   │   ├── base.py <- Base CRUD operations
41-
| | ├── __init__.py <- Makes crud a Python module
42-
| | └── crud_restaurants.py <- CRUD operations for restaurants an example object if we wanted to extend the application
43-
│ │
44-
│   ├── schema <- Folder for the SQLModel models for the application
45-
│   │   ├── restaurant.py <- SQLModel model for restaurants an example object if we wanted to extend the application
46-
| | └── __init__.py <- Makes schema a Python module
47-
| |
48-
│ │
49-
│   └── utils <- Scripts to import data and create the database
50-
│      ├── config.py <- Configuration file for the application that loads the environment variables
51-
│      └── deps.py <- Dependency file for the application that creates the database connection
52-
53-
├── requirements.txt <- The requirements file for reproducing the analysis environment, e.g.
54-
│ generated with `pip freeze > requirements.txt`
55-
└── env.example <- Environment variables for the application
56-
57-
--------
58-
59-
60-
Using Dev Containers we were able to create a Docker container that will automatically install the requirements.txt file and create a PostgresDB instance. This will allow us to run the application locally and in Github Codespaces. You can learn more about Dev Containers here: <https://code.visualstudio.com/docs/remote/containers>
61-
62-
# Set Up Instructions
63-
64-
## Github Codespaces
65-
66-
If you are running the application in Github Codespaces it should Automatically build the application and install the ```requirements.txt``` file. if not run the following command in the terminal:
3+
This repository contains the code for my Master's Thesis Project. The project is a FastAPI application that allows users to upload files, processes the files, and loads the data into a PostgresDB and S3. The application is built using the FastAPI framework and utilizes SQLModel to create the database models. It is designed to be run locally and in Github Codespaces using Dev Containers.
674

68-
```bash
69-
pip install -r requirements.txt
70-
```
5+
## Project Organization
716

72-
## Local Machine
7+
I used the Microsoft devcontainer FastAPI & NodeJS + Typescript template for this project. You can read more about it (here)[https://code.visualstudio.com/remote/advancedcontainers/connect-multiple-containers]. The template is organized as follows:
738

74-
1. Ensure you have Docker installed on your local machine, if not follow the instructions here: <https://docs.docker.com/get-docker/>
9+
## Setup Instructions
7510

76-
2. Clone the repository to your local machine
77-
```git clone https://github.com/Butch78/Bank-Size-Central-Bank-Sensitivity.git```
11+
### Github Codespaces
7812

79-
3. After you open the project, the following pop-up should appear. Click "Reopen in Container"
13+
If you are running the application in Github Codespaces, it will automatically build the application and install the `requirements.txt` file. If not, run the following command in the terminal:
8014

81-
![Alt text](assets/dev_containter_popup.png)
15+
```bash
16+
pip install -r requirements.txt
17+
```
18+
19+
### Local Machine
8220

83-
If not click the green button in the bottom left corner and then select "Reopen in Container"
21+
1. Ensure you have Docker installed on your local machine. If not, follow the instructions here: [Docker Documentation](https://docs.docker.com/get-docker/).
8422

85-
This will build the Docker container and install the requirements.txt file automatically along with creating a PostgresDB instance.
23+
2. Clone the repository to your local machine:
8624

87-
# Start Application Command
25+
```bash
26+
git clone https://github.com/Butch78/Bank-Size-Central-Bank-Sensitivity.git
27+
```
8828

89-
rename the ```.env.example``` file to ```.env```
29+
3. After opening the project, a pop-up should appear. Click "Reopen in Container". If the pop-up doesn't appear, click the green button in the bottom left corner and select "Reopen in Container". This will build the Docker container, install the `requirements.txt` file, and create a PostgresDB instance.
9030

91-
Then the following command will load the Data into the PostgresDB and start a FastAPI application on port 8000, You can view the API documentation at <http://localhost:8000/docs>
31+
## Starting the Application
32+
33+
To load the data into the PostgresDB and start the FastAPI application on port 8000, run the following command:
9234

9335
```bash
9436
uvicorn app.main:app --reload
9537
```
38+
39+
You can view the API documentation at [http://localhost:8000/docs](http://localhost:8000/docs).
40+
41+
## Recommended IDE Setup
42+
43+
For the best development experience, it is recommended to use the following IDE setup:
44+
45+
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin)
46+
47+
## Customize Configuration
48+
49+
For customizing the application configuration, refer to the [Vite Configuration Reference](https://vitejs.dev/config/).
50+
51+
## Project Commands
52+
53+
- `npm install`: Install project dependencies.
54+
- `npm run dev`: Compile and hot-reload for development.
55+
- `npm run build`: Type-check, compile, and minify for production.
56+
- `npm run test:unit`: Run unit tests with Vitest.
57+
- `npm run lint`: Lint with ESLint.
58+
- `docker buildx build . -t vitesse:latest`: Docker production build.
59+
60+
For more details, refer to the project's documentation.

0 commit comments

Comments
 (0)