Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.47 KB

backend-node-task.md

File metadata and controls

49 lines (35 loc) · 1.47 KB

Backend API Development with Node.js and TypeScript

Introduction

The project is a simple social media application that allows users to create posts and follow each other.

Installation & Setup

Follow the steps below to install and set up the project:

  1. Install the project dependencies by running the following command in your terminal:
$ yarn
  1. Start the Docker services defined in the Docker Compose file by running:
$ docker compose -f docker/compose.yaml up -d
  1. create a .env file in the workspaces/backend directory and add the following environment variables:
DATABASE_URL="DATABASE_URL="postgresql://atlys:changeme@localhost:5432/twipper?schema=public"
  1. Navigate to the backend workspace and generate the Prisma client
$ cd workspaces/backend
$ yarn prisma generate
  1. Run the migrations and start the development server
$ yarn prisma migrate dev --name init
$ yarn dev

API Documentation

You can access the API documentation by visiting the following URL: API Documentation

Development Tasks

Here are the tasks that need to be completed:

  • Conduct a walkthrough of the codebase to understand its structure and functionality.
  • Review the codebase and make notes of areas that can be improved.
  • Optimize the /api/v1/posts/feed endpoint for better performance.
  • Implement the /api/v1/users/:id/follow endpoint to allow users to follow each other.