Skip to content

Another project: Next for the frontend, Nest for the backend, Prisma for the ORM

License

Notifications You must be signed in to change notification settings

phalbert/salesdash

Repository files navigation

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 or Ubuntu
  2. Install docker-compose

Commands

All these commands should be run from the root folder

There is only one command to run once you clone the repo

make all

The web app can be loaded at http:https://localhost:3800

The backend api can be found at http:https://localhost:3600

It is composed of the following commands

  1. Run the migrations
make db
  1. Build the containers
make build
  1. Start the containers
make run

Running Locally

Prerequisites

  1. Install node
  2. Install yarn

Backend

Navigate to the backend

cd backend

Then run one of the following commands

# development
$ yarn start

# watch mode
$ yarn start:dev

# production mode
$ yarn start:prod

Frontend

Navigate to the frontend

cd frontend

Then run the app on port 3400

$ yarn dev --port=3400

Architecture