Skip to content

Tietokilta/web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tietokilta Website

CI

Monorepo containing apps and packages used for the Tietokilta website.

Getting started

Set up

Prerequisites:

  • Node.js, usage of fnm or nvm recommended

  • Docker and docker-compose

  • MongoDB Database Tools (for seeding the dev-db).

    NOTE: make sure you are installing MongoDB Database Tools, not something else, the documentation for Linux is quite wonky.

# copy .env.example to .env
cp .env.example .env

# install pnpm
corepack enable

# install dependencies
pnpm install

# start the local database
pnpm db:start

# seed the database with data
pnpm db:populate

# start the dev server
pnpm dev

In case you run into issues when changing branches etc. Try re-seeding your local dev DB:

pnpm db:reset

Recommended VSCode settings

{
  "editor.tabSize": 2,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll": "explicit",
    "source.fixAll.eslint": "explicit",
    "source.fixAll.stylelint": "explicit"
  },
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact"
  ],
  "eslint.workingDirectories": [
    {
      "mode": "auto"
    }
  ],
  "tailwindCSS.experimental.classRegex": [
    ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
  ]
}

Other utilities

# lint all packages
pnpm lint

# format all packages
pnpm format

# typecheck all packages
pnpm typecheck

# codegen (currently includes cms types and graphql schema)
pnpm codegen

# export database to version control
pnpm db:export

What's inside?

This repo includes the following packages and apps:

Apps and Packages

  • @tietokilta/cms: a Payload CMS server, admin panel and CMS
  • @tietokilta/web: a Next.js app, main website using Next 14 and App Router
  • @tietokilta/ui: React UI component library. Built with Tailwind and shadcn/ui
  • @tietokilta/config-typescript: tsconfigs used throughout the monorepo
  • @tietokilta/eslint-config: eslintconfigs used throughout the monorepo

Each package and app is 100% TypeScript!