Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tolumide-ng/modelling-backend
https://github.com/tolumide-ng/modelling-backend
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/tolumide-ng/modelling-backend
- Owner: tolumide-ng
- Created: 2021-04-14T19:26:12.000Z (over 3 years ago)
- Default Branch: develop
- Last Pushed: 2021-05-07T09:04:01.000Z (over 3 years ago)
- Last Synced: 2023-03-06T08:17:25.789Z (almost 2 years ago)
- Language: TypeScript
- Size: 7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# modelling-backend
## Details
The application is currently deployed on [heroku](https://modelling-backend.herokuapp.com/)
### Endpoints
| # | Description | Endpoint | Request Body |
| --- | --------------------------- | ---------------------- | -------------------------- |
| 1 | Upload file to be converted | `/upload` | convertFile (use formData) |
| 2 | Select conversion target | `/convert/:target/:id` | |
| 3 | Stream Conversion status | `/stream/:id` (SSE) | |
| 4 | Download the converted file | `/download/:id` | |### Brief Description
At application currently stores the uploaded file on an `s3 bucket` and streams the conversion using server sent events. Since the conversion is only a mock at the moment, when the user requests that the uploaded file be `converted`, a simple text is written to a file of the target type required by the user and saved on `s3` with the details of `s3 location` saved on the db. Request to download the converted file sends the `s3 location` to the frontend.
### Deployment Model
- GCP
- Use GCP cloud SQL for the local database
- Store files and images on GCP's cloud storage bucket
- Deploy the application image on GCP's AppEngine (I have provided a dockerfile and docker-compose for this application, the image is currently available on dockerhub at `@tolumide/modelling`)
- Use GCP's `Cloud Key Management` for storing secrets## Local Deployment with Docker
- Clone the repo
- `cd` into the application
- Create `.env` file and provide the data as indicated on the `.env.sample` file
- Build the docker image `docker build . -t `
- Run the application with `docker compose up`