8000 GitHub - bodasooqa/ton-society-test: Test task for the Ton Society
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bodasooqa/ton-society-test

Repository files navigation

Ton Society Test Monorepo

Turborepo + Vite + React + TS + Tailwind CSS v4 + shadcn/ui + Nest.js.

Other techonologies:

  • General
    • Zod
  • Frontend:
    • Tanstack Router
    • Tanstack Query
    • Tanstack Virtualizer
  • Backend
    • Nest.js
    • class-validator and class-transformer
  • Code organiztion
    • Biome
    • Lefthook

This repository contains the source code of monorepo.

Table of Contents

Installation

To set up the project locally, follow these steps:

  1. Clone the repository:
    git clone git@github.com:bodasooqa/ton-society-test.git
  2. Navigate to the project directory:
    cd ton-society-test
  3. Install the dependencies:
    pnpm install

Develpment

Just run all of the applications via this command:

turbo dev

Build

Just build all of the applications via this command:

turbo build

Deployment

Deployment is done through Vercel. And Vercel determines that the project is a Turborepo (wow!).

Alt text

Monorepo Structure & Usage

This project is a monorepo managed with Turborepo. It contains multiple packages that can be developed and built together.

To start the development server for all packages, run:

turbo dev

To build all packages for production, run:

turbo build

To add a new sub-project to the apps folder, follow these steps:

  1. Navigate to the apps directory:
    cd apps
  2. Initialize your new application. This can be any frontend application. For example, to create a new Vite project:
    pnpm create vite my-react-app --template react-swc-ts

After adding the new sub-project, you can manage it along with other packages using Turborepo commands.

Data management

The main task of the application is to transfer data between the client application and Notion via the Notion API. For the most part, a separate “backend” project is needed for this purpose.

As a manager, you can add or delete data in a designated table — the application will react on its own. However, if you want to use a new table, you need to specify its ID correctly.

By the way, you can add data in any form. The application will determine if the data is an Address entity and display only the necessary data.

The application has both frontend and backend caching configured. So don't worry if after updating data in the table manually you don't immediately see the changes in the application. This is a drawback, but cache reset is implemented when adding data using a special method on the backend. To make the application react to changes in the table manually and reset the cache, it is necessary to implement interaction with Notion API via WS, but in the task condition there is a block on them.

0