https://github.com/wasswarichard/react-typescript-nestjs-mongodb-docker
real time transactions using react, typescript, nestjs, mongodb, cronjobs, event-emitter, websockets, typescript.
https://github.com/wasswarichard/react-typescript-nestjs-mongodb-docker
cronjob docker event-emitters mongodb mongoose nestjs node nodejs react socket-io typescript websocket websockets
Last synced: 3 months ago
JSON representation
real time transactions using react, typescript, nestjs, mongodb, cronjobs, event-emitter, websockets, typescript.
- Host: GitHub
- URL: https://github.com/wasswarichard/react-typescript-nestjs-mongodb-docker
- Owner: wasswarichard
- Created: 2023-02-26T09:28:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-12T14:40:01.000Z (over 3 years ago)
- Last Synced: 2025-01-03T13:16:42.680Z (over 1 year ago)
- Topics: cronjob, docker, event-emitters, mongodb, mongoose, nestjs, node, nodejs, react, socket-io, typescript, websocket, websockets
- Language: TypeScript
- Homepage:
- Size: 1.17 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Currency Exchange
## Libraries/Frameworks used
- **Frontend**: React, TypeScript, Material UI, Socket.io, Jest, React Testing Library.
- **Backend** : Nestjs, TypeScript, Event-emitter, Mongoose, websockets.
- **Database**: MongoDB
## Running The Application
### 1. To run locally
1. Download and Install MongoDB on your local machine.
2. Inside the `backend` directory, run `npm install` to install the backend dependencies.
3. Obtain a BACKEND_URL_ACCESS_KEY by creating an account on https://coinlayer.com/ a real-time crypto currency exchange api.
4. Create a `.env` file under `backend` directory and set the following environment variables:
```
BACKEND_URL=http://api.coinlayer.com/api
BACKEND_URL_ACCESS_KEY=522df20f7bc454382c04e7f9f042b7ae
DATABASE_URL=mongodb://127.0.0.1:27017/cryptocurrency
```
Start the nestjs server using `npm start`. The server will start on http://localhost:3001
Now that the nestjs server is running, bootstrap the frontend:
5. Inside the `frontend` directory, run `npm install` to install the frontend dependencies.
6. Create a `.env` file under `frontend` directory and set the following environment variables:
```
REACT_APP_BACKEND_URL=http://localhost:3001
```
7. Start the frontend dev server using `npm start`. The server will start on http://localhost:3000
### 2. To run application using Docker
1. Obtain a BACKEND_URL_ACCESS_KEY by creating an account on https://coinlayer.com/ a real-time crypto currency exchange api.
2. Update the docker-compose.yml file in the root of the project and replace BACKEND_URL_ACCESS_KEY with the obtained key.
3. In the root of the project run `docker-compose up --build`. The backend will start running on port 3001 and frontend on port 3000. The application can be accessed on http://localhost:3000
## Test cases snapshot
Frontend:

Thanks for your time :)