/sws-fullstack

Backend with Nestjs + Typescript + SQlite. Frontend with Nextjs + Akita state management

Primary LanguageTypeScript

Description

SWS application to provide relevant information (stocks) for companies world-wide.

SonarCloud

Backend will be running on http://localhost:4000 and frontend on http://localhost:3000

Frontend deployment: https://sws-fullstack.vercel.app/

Backend deployment: http://sws-backend.victorkurauchi.co/companies

Note:

There are integration tests on the backend to confirm that all required operations work as expected.

For the next iterations:

  • dockerize backend
  • deploy backend with Kubernetes (Digital Ocean)
  • deploy frontend with Vercel
  • e2e frontend with Cypress
  • configure https certificate in Kubernetes (Digital Ocean)

Setup docker backend (optional)

$ cd backend
$ docker build . -f .cicd/docker/Dockerfile.node
$ docker run -p 4000:4000 <image id>
$ open http://localhost:4000/companies

Deploying to kubernetes

Apply kube changes

cd backend kubectl apply -f .cicd/kube kubectl get pods

Get ingress public IP/Host

kubectl get ing --watch

Backend

Technologies

  • NestJS
  • Jest
  • Supertest
  • Dependency Injection
  • TypeORM
  • Sonarcloud
$ cd backend
$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
Frontend

Technologies

  • NextJS
  • Jest
  • Akita state management
  • RxJS
  • AntDesign
  • React hooks

Installation

$ cd sws-frontend
$ yarn install

Running the app

# development
$ yarn dev

# production mode
$ npm run start:prod

Test

# e2e tests
$ yarn e2e

# unit tests
$ yarn test

# test coverage
$ yarn coverage