Skip to content

ushashir/kro-be-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

  • This is a take home task as part of recruitment process for Kro

How to setup Backend

  • Clone the repo with git clone <repo url>
  • Run yarn to install all the packages
  • Run yarn prisma:generate to generate Prisma
  • Set up or connect with Postgress database
  • Run yarn db.migration:create to apply create migration
  • Run yarn db.migration.apply to apply migration to database
  • Run yarn start:dev to start development server on local host 4001 or any other port of your choice
  • Run yarn test to run unit test
  • Register a user with email and password using the register endpoint.
  • Swagger API ducumentation can be assessed at <base url>/swagger e.g http://localhost:4002/swagger
  • Get userId of the registered user and manually replace it with the userId in the seed data located in src/commom/database/seed-data/transactions.seed.ts
  • login using your email and password, go to apa/transactions endpoint to view all transactions by the registered user.

Task Requirement Details

Take-Home Task for Kro

Overview

Please complete this task; It simulates a basic flow in a typical fintech app, so super relevant for what you’ll be doing day-to-day.

Description

You’re going to create an app that allows users to sign up (email + PW only), log in, and view a dashboard of financial transactions for that specific user. The backend should be built with Node.js. Requirements

Backend

API Endpoints:

  • Signup: Allows new users to create an account by providing an email, first name, last name, and a password. The user details should be stored in the database in a safe way.
  • Login: Authenticates a user using email and password, and returns a JWT token.
  • Transactions: Retrieves a list of financial transactions for the logged-in user. Each transaction should have the following fields:
  • id
  • amount
  • type (withdrawal / deposit)
  • timestamp
  • payment method
  • user id

A sample mock data containing transactions will be linked to this task. Feel free to attach a payment method and some user ids to the transaction and use that.

Database:

Please use PostgreSQL as your database. You can use Neon for free, or something else if you prefer You’re free to design the database how you see fit. It must be proper and follow best practices.

Submission Guidelines

  • Submission is expected at most 72 hours after receiving this task. Your submission should be a link to a GitHub repository containing your project. IMPORTANT: Please use different commits throughout the progress, and not just a single commit with everything. We need to see your planning process, and how you work in stages.
  • Include a README file with instructions on how to set up and run the backend locally (incl. any necessary environment variables).
  • Include a postman collection if possible so that the API can easily be tested Ensure your code is clean and readable. Automated tests are a bonus

Good luck!

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

$ yarn install

Running the app

# development
$ yarn run start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn 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.

Stay in touch

License

Nest is MIT licensed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published