Skip to content

Latest commit

 

History

History
94 lines (83 loc) · 3.36 KB

README.md

File metadata and controls

94 lines (83 loc) · 3.36 KB

Workspace reservation system

This is a workspace reservation web application for company Endava. Where you can dynamically choose your workspace or reserve it for a few days in advance. It's simple and easy to use. Save time and optimize workflow with our app.

Application is available at: Workspace reservation system
Note: This may not be the final version.

Getting started with Docker

First you need to have Docker Engine and Docker Compose installed on your computer. Then go to the root directory of the application where docker-compose.yml is located and open command line. Write the following command which will build and run our application.

docker-compose up

After that just enter http://localhost:3000 in a browser to see the application running.

The API documentaion is available at http://localhost:8000/swagger.

Getting started without Docker

First you need to install all necessary packages on the frontend and backend:

cd frontend
npm i

cd backend
npm i

After that create a .env file in the frontend folder, it should look something like this.

REACT_APP_BE_BASE_URL=http://localhost:8000/api/
REACT_APP_API_VERSION=v1
REACT_APP_FIREBASE_API_KEY=<api-key>
REACT_APP_FIREBASE_AUTH_DOMAIN=reservation-system-endava.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_ID=reservation-system-endava
REACT_APP_FIREBASE_STORAGE_BUCKET=reservation-system-endava.appspot.com
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=<messaging-sender-id>
REACT_APP_FIREBASE_APP_ID=<firebase-app-id>
REACT_APP_FIREBASE_MEASUREMENT_ID=<measurement-id>

After that create a .env file in the backend folder, it should look something like this.

 DATABASE_URI=mongodb+srv://<username>:<password>@cluster0.g1ftw.mongodb.net/myFirstDatabase?retryWrites=true&w=majority
 PORT=8000

In backend you will also need to create a file firebase-service-account.json and fill in this information.

{
  "type": "service_account",
  "project_id": "",
  "private_key_id": "",
  "private_key": "",
  "client_email": "",
  "client_id": "",
  "auth_uri": "",
  "token_uri": "",
  "auth_provider_x509_cert_url": "",
  "client_x509_cert_url": ""
}

Note: if backend won't start and the console shows: "0 errors and crashed with the Error: Cannot find module './*'", delete .dist and .node_module folders. Then run npm i and npm rebuild.

To start the application you need to run the frontend and backend server with the following commands.

cd frontend
npm start

cd backend
npm run start

Note: if you are using Windows you shouldn't define »NODE_ENV« in package.json, so instead of having "start:dev": "NODE_ENV=development nest start --watch " you should only have "start:dev": " nest start --watch " both on frontend and backend package.json files.!

Project details

NodeJS version: 17.7.2
ReactJS version: 18.1.0
Typescript version: 4.6.4
NestJS version: 8.0.0

Important frontend packages

  • redux
  • redux-saga
  • redux-toolkit
  • react-router
  • tailwindcss
  • typescript
  • react-hook-form
  • uuid
  • axios
  • i18next

Important backend packages

  • nestjs
  • mongoose
  • typescript