Monorepo containing apps and packages used for the Tietokilta website.
Prerequisites:
-
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
{
"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\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
]
}
# 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
This repo includes the following packages and apps:
@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!