Skip to content

Monorepo showcasing a take-home test project using Next.js for the frontend and Nest.js for the backend

Notifications You must be signed in to change notification settings

danpvlz/take-home-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Take-Home Test - Monorepo Project - GitHub Commit Viewer

This monorepo project is a GitHub Commit Viewer, showcasing the commit history and repository information for the current project using the GitHub API.

Table of Contents

Introduction

This project aims to provide a user-friendly interface for exploring GitHub commit history and repository details. The frontend, built with Next.js, interacts with the backend, powered by NestJS, to fetch data from the GitHub API.

Package Manager and Workspaces

This project uses pnpm as the package manager and utilizes pnpm workspaces for managing the monorepo structure. Feel free to refer to the pnpm documentation for more information.

Tech Stack

  • Frontend:

    • Next.js 14
    • React
    • TypeScript
    • TailwindCSS
    • tRPC
    • Jest (for testing)
    • Cypress (for end-to-end testing)
  • Backend:

    • NestJS
    • TypeScript
    • tRPC
    • Jest (for testing)
  • Other Libraries:

    • Zod (for schema validation)
    • MomentJS (for date formatting)

Folder Structure

  • apps/
    • backend/: Contains the NestJS backend.
    • frontend/: Houses the Next.js frontend.

Installation

Node.js

Make sure you have Node.js installed. This project requires Node.js version 20.9.0. If you don't have it installed, you can download it from the official Node.js website.

pnpm

This project uses pnpm as its package manager. If you don't have pnpm installed, you can install it by following the instructions in the pnpm documentation.

  1. Clone the repository:

    git clone https://github.com/danpvlz/take-home-test.git
    cd take-home-test
  2. Create .env files in the backend and frontend directories with the following content:

    backend/.env

     GITHUB_TOKEN=[token-send-via-mail]
     PORT=5000

    frontend/.env

     NEXT_PUBLIC_NESTJS_BACKEND=http://localhost:5000
  3. Install dependencies for both backend and frontend, run this command at the root of the project:

    pnpm install

Usage

  1. Start the project, run this command at the root of the project:
     pnpm dev
  2. Open project at local http://localhost:3000/

Testing

Whole project

Run the following command in the root directory:

pnpm run test

Backend Testing

Run the following command in the root directory:

cd apps/backend
pnpm run test

Frontend Testing

Unit testing (Jest)

Run the following command in the root directory:

cd apps/frontend
pnpm run test

End-to-End Testing (Cypress)

Must have project running Run the following command in the root directory:

cd apps/frontend
pnpm run cypress:run

About

Monorepo showcasing a take-home test project using Next.js for the frontend and Nest.js for the backend

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published