Skip to content

Latest commit

 

History

History

web

Snipcode Web

This project is about the front end of Snipcode. It holds the website landing page, the web application, and the blog pages.

Website

Tech Stack

  • Next.js
  • Tailwind CSS
  • Typescript

Prerequisites

Make sure you have this tools installed before running the project

  • Node.js 16+
  • NPM or Yarn

Packages dependencies

We use Yarn workspace to create packages we can share with other applications. These packages are located in the folder packages, so you might need to change the code of one or many packages to implement a feature. Here are the packages used in the front-end application:

Set up the project

Delete the existing folders output from build commands

yarn clean

Install node modules

yarn install

Create configuration file from the template

cp .env.template .env.local

# Edit configuration to match your local environment and save
nano .env.local
Variable Description
NEXT_PUBLIC_APP_ENV Environment where the application is running (default: development)
NEXT_PUBLIC_GITHUB_CLIENT_ID GitHub application client ID for authentication with GitHub
NEXT_PUBLIC_SERVER_URL URL of the backend application
NEXT_PUBLIC_APP_URL URL of this application (default: http:https://localhost:7500)
NEXT_PUBLIC_SENTRY_DSN Sentry DSN

Start the application

yarn dev

Open http:https://localhost:7500 in your browser to see the page.

Running tests

Run the command below to run all the tests

yarn test

To run a specific test file, append the filename after the command

yarn test home.test.ts

Lint the project

ESLint and Prettier are used to normalize the code style across the project. Linting the code make sure there is no error

yarn lint