Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apis init #3

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e9ee426
apis init
SanchitUke Sep 22, 2023
723f1f4
response objects
SanchitEsMagico Sep 22, 2023
1532958
swagger module implementation
SanchitEsMagico Sep 22, 2023
bf22ee3
review changes and docker
SanchitEsMagico Oct 3, 2023
799953c
enduser to consumer
SanchitEsMagico Oct 3, 2023
42eed9a
readme updated
SanchitEsMagico Oct 11, 2023
1087ef9
added services diagram
SanchitEsMagico Oct 13, 2023
d07a34c
changed userId to uuid
SanchitEsMagico Nov 9, 2023
6be1526
minor debugging
SanchitEsMagico Nov 9, 2023
77c8992
Added seed data
kh4l1d64 Nov 14, 2023
43232cd
logger and error handling
SanchitEsMagico Nov 14, 2023
19e7114
request type fix
SanchitEsMagico Nov 14, 2023
6a2da72
error fixes
SanchitEsMagico Nov 16, 2023
bba68cd
utils change
SanchitEsMagico Nov 20, 2023
0e8be47
Error message
SanchitEsMagico Nov 27, 2023
39a0789
get all user credits
SanchitEsMagico Nov 28, 2023
824ce71
settlement update
SanchitEsMagico Nov 28, 2023
bd10c0f
seed update
SanchitEsMagico Nov 28, 2023
5e79c39
seed update
SanchitEsMagico Dec 1, 2023
bd7f7f8
refund credits for failed purchase
SanchitEsMagico Dec 7, 2023
2bb9589
seed update
SanchitEsMagico Dec 12, 2023
a9323b3
Updating the docker file for deployment
Dec 13, 2023
d9e5135
Adding final changes for deployment
Dec 15, 2023
b34ebb0
Added logs and updated seed data
kh4l1d64 Apr 17, 2024
335d9fd
Delete .env
kh4l1d64 Apr 17, 2024
743b9f3
Update env-sample
kh4l1d64 Apr 17, 2024
87baba7
Added wallet delete API
kh4l1d64 Apr 21, 2024
8c5bcd1
Creating views for data visualization.
VamshiBatta07 Jul 17, 2024
2588164
Merge pull request #4 from COMPASS-DPG/feature/create-views
VamshiBatta07 Jul 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Dockerfile
.dockerignore
.env
node_modules
npm-debug.log
dist
7 changes: 0 additions & 7 deletions .env

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
dist
.env
35 changes: 35 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# Use the official Node.js 18 image as a base
FROM node:18.16.1-alpine

# Install bash for debugging purposes (optional)
RUN apk add --no-cache bash

# Install global Node.js packages for NestJS development
RUN npm i -g @nestjs/cli typescript ts-node

# Set the working directory inside the container
WORKDIR /usr/src/app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Copy the Prisma configuration and migration files
# This line copies the "prisma" directory from your project's root into the Docker container's working directory.
COPY prisma ./prisma/
COPY env-sample ./.env
# Install project dependencies
RUN npm install

# Copy the rest of the application code to the container
COPY . .

# Build your Nest.js application
RUN npm run build

# Expose the PORT environment variable (default to 4022 if not provided)\\
ENV PORT=4022
EXPOSE $PORT

# Start the Nest.js application using the start:prod script
CMD ["npm", "run", "start:prod"]
83 changes: 14 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,18 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a>
</p>
# Wallet Service

[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
[Compass Product Flow](https://miro.com/app/board/uXjVMkv3bh4=/?share_link_id=179469421530)
[Compass Services Diagram](https://app.diagrams.net/#G1ZcWAg558z88DcWNC4b2NKt1Q3MAPHSZu)

<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
## Use Cases
Admin:
- Add/reduce credits to end user’s wallet
- View admin-user transaction history
- View admin-3CP transaction history

## Description
3CP:
- View transaction history with marketplace

[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.

## Installation

```bash
$ npm install
```

## Running the app

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

## Test

```bash
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
```

## Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).

## Stay in touch

- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)

## License

Nest is [MIT licensed](LICENSE).
EndUser:
- View remaining credits
- View transaction history of credits
- Purchase courses with credits
23 changes: 11 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
version: '3.8'
services:

postgres:
image: postgres:13.5
restart: always
environment:
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
volumes:
- postgres:/var/lib/postgresql/data
wallet:
build:
context: .
dockerfile: Dockerfile
container_name: wallet-service
ports:
- '5434:5432'
- 4022:4022
networks:
- samagra_compass

volumes:
postgres:
networks:
samagra_compass:
external: true
4 changes: 4 additions & 0 deletions env-sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NODE_ENV=development
PORT=
DATABASE_URL=
TELEMETRY_DATABASE_NAME=
Loading