https://github.com/phalbert/salesdash
Another project: Next for the frontend, Nest for the backend, Prisma for the ORM
https://github.com/phalbert/salesdash
javascript nestjs nextjs prisma queueing reactjs redis typescript
Last synced: 4 months ago
JSON representation
Another project: Next for the frontend, Nest for the backend, Prisma for the ORM
- Host: GitHub
- URL: https://github.com/phalbert/salesdash
- Owner: phalbert
- License: mit
- Created: 2020-09-23T00:45:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-30T10:32:02.000Z (over 1 year ago)
- Last Synced: 2025-01-23T07:29:46.479Z (about 1 year ago)
- Topics: javascript, nestjs, nextjs, prisma, queueing, reactjs, redis, typescript
- Language: JavaScript
- Homepage: https://salesdash-web-2zf6oocjqa-uc.a.run.app/
- Size: 38.1 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SalesDash
A simple application that demonstrates file upload using streaming.
## Why?
1. Keep the file on the client end. This is very useful especially in a serverless deployment (Since you are mindful of cost, then if you can keep from saving the file server side, then its good).
2. Allows us to do things like track progress using the streamed chunks i.e. percentage of completed chunks of total chunks
3. We could also do advanced operations like pause and resume the upload since we can track which chunk is currently being uploaded.
## Getting Started
### Running with Docker
This is the more convenient option
#### Prerequisites
1. Install Docker [on windows](https://docs.docker.com/get-docker/) or [Ubuntu](https://docs.docker.com/engine/install/ubuntu/)
2. Install [docker-compose](https://docs.docker.com/compose/install/)
#### Commands
> All these commands should be run from the root folder
There is only one command to run once you clone the repo
```bash
make all
```
The web app can be loaded at http://localhost:3800
The backend api can be found at http://localhost:3600
It is composed of the following commands
1. Run the migrations
```bash
make db
```
2. Build the containers
```bash
make build
```
3. Start the containers
```bash
make run
```
### Running Locally
#### Prerequisites
1. Install [node](https://nodejs.org/en/download/)
2. Install [yarn](https://classic.yarnpkg.com/en/)
#### Backend
Navigate to the backend
```bash
cd backend
```
Then run one of the following commands
```bash
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
```
#### Frontend
Navigate to the frontend
```bash
cd frontend
```
Then run the app on port 3400
```bash
$ yarn dev --port=3400
```
## Architecture