Skip to content

Latest commit

 

History

History
87 lines (56 loc) · 2.56 KB

README.md

File metadata and controls

87 lines (56 loc) · 2.56 KB

Sublinks Frontend

This is the default frontend for the Sublinks project. It's built using the NextJS framework and React library.

Together with the Sublinks Core and Sublinks Federation it's creating a federated link aggregation and microblogging platform.

Contributing

Developer Guidelines

CONTRIBUTING.md

Feature Requests / Bugs

Please post any feature requests or bug reports in the repository's Issues section.

Developing

NextJS Telemetry

Before you start be aware that NextJS has started collecting telemetry data when using it.
Here's how you can opt-out: https://nextjs.org/telemetry#how-do-i-opt-out

Prerequisites

  • Node version >=20.0.0
  • NPM version >=9.0.0

Install dependencies

  npm i

Environment Setup

To run this project, you need to set up the necessary environment variables. A template for these variables can be found in the .env.example file.

Docker

A Docker Compose configuration is made available via a git submodule. This provides an environment which contains a real connection to the Sublinks API and other services. As close to a production-like environment we can test and develop towards locally.

Setup

To use this Docker setup you first need to complete a few steps:

  • Authenticate towards GitHub's container registry(GHCR)
    • Please follow this guide to create an access token and authenticate before running the below command.
  • Run git submodule update --init --recursive to pull down all submodules
  • Run git submodule update --recursive --remote after the initial pull to receive the latest submodule changes

Run

  npm run dev:docker

This will expose a NextJS dev environment at http://localhost. It also runs a seeding script which inserts several data entities on startup. To give you something to work with, without having to manually create users and such.

Non-Docker

Run

  npm run dev

This will expose a NextJS dev environment at http://localhost:3000. It makes no API requests and instead uses a couple test data files.

Testing

Lint

  npm run lint

Unit Tests

  npm run test:unit
  npm run test:unit:watch

E2E Tests

  TBD

Deploying

TBD