Skip to content

Metris-Energy/full-stack-software-engineer-exercice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Manager - Technical Assessment

A simple Task Manager application built with Next.js, Apollo GraphQL, KnexJS, and PostgreSQL.

Getting Started

Prerequisites

  • Docker and Docker Compose installed on your machine
  • NodeJS
  • Npm (or other NodeJS package manager)

Running the Application

  1. Clone this repository
  2. Run the following command:
docker compose up 
  1. Create the database tables
npm run migrate
  1. Seed your database with initial data
npm run seed
  1. Start backend service
> cd backend
> npm run dev
  1. Start frontend service
> cd frontend
> npm run dev
  1. Open your browser:

Project Structure

├── backend/
│   ├── server.js       # Express + Apollo Server
│   ├── db.js           # Database connection
│   ├── schema.js       # GraphQL schema
│   ├── resolvers.js    # GraphQL resolvers
│   ├── knexfile.js     # Knex configuration
│   ├── migrations/     # Database migrations
│   └── seeds/          # Seed data
├── frontend/
│   ├── pages/
│   │   └── index.tsx   # Main page
│   ├── next.config.js  # Next.js configuration
│   └── tsconfig.json   # TypeScript configuration
└── docker-compose.yml

Your Tasks

1. Find and Fix Bugs

The application has several bugs in both the backend and frontend. Your task is to:

  • Identify the bugs
  • Fix them
  • Explain why they were bugs

2. Make Improvements

After fixing the bugs, make at least two improvements from the following:

  • Remove inefficient queries (N+1 problems)
  • Add validation and error handling
  • Fix database insert return values
  • Proper async/await handling
  • Frontend re-render optimization
  • Optimistic UI updates or proper refetching

3. Explain Trade-offs

As you work, explain your thought process:

  • What are you prioritizing and why?
  • What trade-offs are you making?
  • How would you approach this differently in a production environment?

Expected Deliverables

  1. Working code with bugs fixed
  2. At least 2 meaningful improvements
  3. Clear explanation of changes made

Tech Stack

  • Frontend: Next.js, React, TypeScript
  • Backend: Node.js, Express, Apollo Server
  • Database: PostgreSQL with KnexJS
  • Infrastructure: Docker, Docker Compose

Good luck!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors