Skip to content

Commit

Permalink
Merge pull request #31 from timi-codes/chore/final-cleanup
Browse files Browse the repository at this point in the history
final cleanup
  • Loading branch information
timi-codes authored Oct 9, 2024
2 parents 06eed8b + 8605196 commit ba2f001
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 30 deletions.
6 changes: 4 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#DB
DB_HOST=postgres #use "postgres" if using docker or "localhost" when running through yarn
DB_HOST=postgres #use "localhost" when running through yarn
DB_PORT=5432
DB_NAME=coinfolio
DB_USER=postgres
Expand All @@ -15,5 +15,7 @@ JWT_AUDIENCE=coinfolio
PRIVY_APP_ID= #
PRIVY_APP_SECRET= #

REDIS_HOST= redis #use "redis" if using docker or "localhost" when running through yarn
# PRIVY_VERIFICATION_ENABLED=true #enable to use privy server for verification

REDIS_HOST= redis #use "localhost" when running through yarn
REDIS_PORT=6379
37 changes: 19 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,23 @@ Manage, track, and analyze the value of your digital assets, including NFTs (ERC

</details>

### Running with Docker

- Run migrations
> Run the command below to create the database schema
```shell
docker compose run coinfolio-api yarn run db:migrate
```

- Run the project
> Run the command below to start the project
```shell
docker compose up -d --build
```

- Navigate to `http://localhost:4000/api-docs` to access the API documentation
- The root folder contain a token.json file that contains test data

### Running Manually with Yarn
- Run migrations
> Run the command below to create the database schema
Expand Down Expand Up @@ -129,27 +146,11 @@ Manage, track, and analyze the value of your digital assets, including NFTs (ERC
```

- Navigate to `http://localhost:4000/api-docs` to access the API documentation


### Running with Docker

- Run migrations
> Run the command below to create the database schema
```shell
docker compose run coinfolio-api yarn run db:migrate
```

- Run the project
> Run the command below to start the project
```shell
docker compose up -d --build
```

- Navigate to `http://localhost:4000/api-docs` to access the API documentation
- The root folder contain a token.json file that contains test data


## API Documentation
Navigate to `http://localhost:4000/api-docs` to access the API documentation
- Navigate to `http://localhost:4000/api-docs` to access the API documentation

## Architecture Diagram
![Logo](./docs/auth-architecture-image.png)
Expand Down
2 changes: 0 additions & 2 deletions deployment.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,4 @@ export class AppController {
getHello(): string {
return this.appService.getHello();
}

@Get('health')
checkServiceHealth(): string {
return this.appService.getHello();
}
}
3 changes: 0 additions & 3 deletions src/assets/assets.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ import {
HttpException,
ConflictException,
HttpStatus,
UsePipes,
UseGuards,
} from '@nestjs/common';
import { AssetsService } from './assets.service';
import { CreateAssetDto } from './dto/create-asset.dto';
import { ValidateUuidPipe } from '../common/pipes/validate-uuid.pipe';
import { TasksService } from '../tasks/tasks.service';
import { AuthGuard } from '../auth/auth.guard';
import { AssetType, IAsset } from './entities/asset.entity';
Expand Down Expand Up @@ -85,7 +83,6 @@ export class AssetsController {
@UseGuards(AuthGuard)
@Delete(':id')
@SwaggerDecorator.getDecorators('remove')
@UsePipes(new ValidateUuidPipe())
async remove(
@Param('id') id: string,
@CurrentUser() user: IUser,
Expand Down
27 changes: 27 additions & 0 deletions token.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

[
{
"contract_address": "0x9c8ff314c9bc7f6e59a9d9225fb22946427edc03",
"chain": 1,
"type": "ERC-721",
"token_id": 9
},
{
"contract_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"chain": 1,
"type": "ERC-20",
"quantity": 20000
},
{
"contract_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"chain": 1,
"type": "ERC-20",
"quantity": 4.5
},
{
"contract_address": "0x59468516a8259058bad1ca5f8f4bff190d30e066",
"chain": 1,
"type": "ERC-721",
"token_id": 2
}
]

0 comments on commit ba2f001

Please sign in to comment.