Skip to content

Latest commit

 

History

History

captify-test-work

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Captify test task

Task:

Frontend:

  • Simple table with 1 column (with 3 columns)
  • Textfield with a button to add new row to the table

Backend:

  • Simple API to store table in memory
  • Routes to get table and add new row to table (also edit and delete routes are available)
  • Table cannot store more than 10 records

Validations:

  • Rows should not be affected by xss (ReactJS is quite safe by design since)

Requirements:

  • Clear/Modular structure
  • React + Express
  • Unit tests (only the backend side)
  • Simple Readme

Be a plus:

  • async/await
  • Code style
  • Es6+ (TypeScript)
  • Any npm module can be used
  • Material-ui usage (Ant Design was used)
  • Build process (application checks lint, tests, starts)

Time to complete the task: 2 hours

Technical stack:

  • TypeScript everyware
  • NestJS as the main backend framework
  • NextJS as the main frontend framework
  • Redux
  • Ant Design
  • Styled Components

Run (production mode):

Requirements:

  • Docker
  • docker-compose
$ docker-compose up --build web

After the docker has completed all the tasks, you should be able to see the working project on http://localhost

Api docs should be available on http://localhost/api-docs

Run (development mode):

Requirements:

  • NodeJS v10+

Backend:

To run the backend in development mode, you must to setup environment variables: NODE_ENV=development and API_PORT=3001 and run yarn start:dev from the package.json.

The API will be available on http://localhost:3001/api/v1

The api docs will be available on http://localhost:3001/api-docs

For more commands look at the package.json file.

Frontend:

To tun the frontend in development mode you must create the .env file in the frontend folder and put there environment variable NODE_ENV=development. Then just run yarn dev command from the package.json.

Frontend part should be available on http://localhost:3000