Skip to content

API which supports a common CRUD pattern to encrypt and decrypt notes

Notifications You must be signed in to change notification settings

ManjiriBirajdar/secret-notes-api

Repository files navigation

Description

REST API which supports a CRUD operations to encrypt and decrypt notes

Tech stack:

  1. TypeScript

  2. NestJS

  3. MongoDB

  4. Jest Testing Framework (in progress)

  5. Encryption type : aes-256-gcm

  6. Application is packaged inside docker and can be deployed using docker-compose

  7. Sample GitHub Actions

  8. E2E Testing using Postman API platform

Using Docker-Compose

There is a docker-compose.yml file for starting Docker.

docker-compose up

After running the sample, you can stop the Docker container with

docker-compose down

E2E Testing using postman api platform

Import "/secret-notes-api/test/SecretNotes-postman-collection.json" in postman

Refer Published documentation

Local Deployment

Install Dependencies

#installation
$ pnpm install

Setup mongodb locally in docker

Go to app.module.ts and update 'mongo' to 'localhost'

MongooseModule.forRoot('mongodb://localhost:27017/secretnote'),

#start mongodb 
docker-compose up

Run application

# development
$ pnpm run start  OR nest start

# watch mode
$ pnpm run start:dev OR nest start --watch

# production mode
$ pnpm run start:prod

Run tests

Using Jest (in progress)

# unit tests
$ jest 

Resources

Check out a few resources that may come in handy when working with NestJS:

License

MIT licensed.

About

API which supports a common CRUD pattern to encrypt and decrypt notes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published