Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are non-sensitive variables, hence they are in git.
PUBLIC_ADMIN_URL=http://localhost:5174
PUBLIC_PLAYWRIGHT=
16 changes: 0 additions & 16 deletions .env.example

This file was deleted.

31 changes: 1 addition & 30 deletions .github/workflows/_deploy-reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,10 @@ on:
required: true
type: boolean
secrets:
APP_DB_URL:
required: true
APP_DB_AUTH_TOKEN:
required: true
NETLIFY_SITE_ID:
required: true
NETLIFY_ACCESS_TOKEN:
required: true
_GITHUB_PRIVATE_KEY:
required: true
REDIS_URL:
required: true
ADMIN_PAGE_PASSWORD:
required: true
EMAIL_ADDRESS:
required: true
EMAIL_PASSWORD:
required: true
ENABLE_EMAILS:
required: true
APPROVAL_EMAIL:
required: true

jobs:
build-and-deploy:
Expand Down Expand Up @@ -56,25 +38,14 @@ jobs:
run: pnpm i

- name: Build database
env:
APP_DB_URL: ${{ secrets.APP_DB_URL }}
APP_DB_AUTH_TOKEN: ${{ secrets.APP_DB_AUTH_TOKEN }}
run: |
pnpm db:setup
pnpm db:update

- name: Build app
env:
APP_DB_URL: ${{ secrets.APP_DB_URL }}
APP_DB_AUTH_TOKEN: ${{ secrets.APP_DB_AUTH_TOKEN }}
GITHUB_PRIVATE_KEY: ${{ secrets._GITHUB_PRIVATE_KEY }}
REDIS_URL: ${{ secrets.REDIS_URL }}
ADMIN_PAGE_PASSWORD: ${{ secrets.ADMIN_PAGE_PASSWORD }}
EMAIL_ADDRESS: ${{ secrets.EMAIL_ADDRESS }}
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}
ENABLE_EMAILS: ${{ secrets.ENABLE_EMAILS }}
APPROVAL_EMAIL: ${{ secrets.APPROVAL_EMAIL }}
PUBLIC_PLAYWRIGHT: ''
PUBLIC_ADMIN_URL: ${{ vars.PUBLIC_ADMIN_URL }}
run: pnpm build

- name: Get latest commit message
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Test database
run: |
pnpm db:setup:catdat
pnpm db:setup
pnpm db:update

- name: Cache Playwright browsers
Expand All @@ -44,4 +44,6 @@ jobs:
run: pnpm exec playwright install --with-deps chromium

- name: Run Playwright tests
env:
PUBLIC_ADMIN_URL: http://localhost:5174
run: pnpm e2e
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ node_modules
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
Expand Down
9 changes: 3 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,9 @@ You need to have [Git](https://git-scm.com/), [NodeJS](https://nodejs.org/) and
2. Clone your fork with `git clone https://github.com/{your_username}/CatDat.git`.
3. Change into the directory with `cd CatDat`.
4. Install dependencies with `pnpm install`.
5. Create a local `.env` file from `.env.example`.
6. Create the local database with `pnpm db:setup`.
7. Update the local database with `pnpm db:update`.
8. Start the local development server with `pnpm dev`.

**For Maintainers:** Redis is required for admin features and submissions. Start a local instance on port 6379 via `redis-server --port 6379`.
5. Create the local database with `pnpm db:setup`.
6. Update the local database with `pnpm db:update`.
7. Start the local development server with `pnpm dev`.

### Updating the Database

Expand Down
4 changes: 0 additions & 4 deletions DATABASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,3 @@ to check for redundant assignments of properties to categorical structures.
This is the database schema as of 01.07.2026; changes may occur.

<img alt="database diagram" src="https://github.com/user-attachments/assets/cfde0cea-07fa-4538-8ebb-9d97b1c352cc" />

## Application Database

The application itself uses another database to store user submissions and page visits. The local copy of this database is at `/databases/app/app.db`.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,9 @@ You need to have [Git](https://git-scm.com/), [NodeJS](https://nodejs.org/) and
2. Clone your fork with `git clone https://github.com/{your_username}/CatDat.git`.
3. Change into the directory with `cd CatDat`.
4. Install dependencies with `pnpm install`.
5. Create a local `.env` file from `.env.example`.
6. Create the local database with `pnpm db:setup`.
7. Update the local database with `pnpm db:update`.
8. Start the local development server with `pnpm dev`.

**For Maintainers:** Redis is required for admin features and submissions. Start a local instance on port 6379 via `redis-server --port 6379`.
5. Create the local database with `pnpm db:setup`.
6. Update the local database with `pnpm db:update`.
7. Start the local development server with `pnpm dev`.

## Tech Stack

Expand All @@ -61,6 +58,10 @@ Built with modern web technologies:
- Math Rendering: [katex](https://www.npmjs.com/package/katex)
- End-to-end testing: [Playwright](https://playwright.dev)

## Admin application

The repository [CatDatAdmin](https://github.com/ScriptRaccoon/CatDatAdmin) contains the admin functionality for CatDat.

## Similar projects

_CatDat_ draws inspiration from and complements other resources in category theory:
Expand Down
79 changes: 0 additions & 79 deletions databases/app/scripts/setup.ts

This file was deleted.

13 changes: 2 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "pnpm env:check && vite dev",
"dev": "vite dev",
"dev:remote": "vite dev --mode prod",
"dev:host": "vite dev --host",
"build": "vite build",
Expand All @@ -14,11 +14,9 @@
"format": "prettier --write .",
"lint": "prettier --check .",
"prepare": "husky",
"env:check": "tsx scripts/env.check",
"db:shell": "sqlite3 databases/catdat/catdat.db",
"db:kill": "rm -rf databases/catdat/catdat.db",
"db:setup:catdat": "pnpm db:kill && tsx --tsconfig databases/tsconfig.json databases/catdat/scripts/setup.ts",
"db:setup": "pnpm db:kill && tsx --tsconfig databases/tsconfig.json databases/catdat/scripts/setup.ts && tsx --tsconfig databases/tsconfig.json databases/app/scripts/setup.ts",
"db:setup": "pnpm db:kill && tsx --tsconfig databases/tsconfig.json databases/catdat/scripts/setup.ts",
"db:seed": "tsx --tsconfig databases/tsconfig.json databases/catdat/scripts/seed.ts",
"db:deduce": "tsx --tsconfig databases/tsconfig.json databases/catdat/scripts/deduce.ts",
"db:test": "tsx --tsconfig databases/tsconfig.json databases/catdat/scripts/test.ts",
Expand All @@ -40,7 +38,6 @@
"@types/katex": "^0.16.8",
"@types/markdown-it": "^14.1.2",
"@types/node": "^25.5.0",
"@types/nodemailer": "^8.0.0",
"better-sqlite3": "^12.9.0",
"chokidar": "^5.0.0",
"dotenv": "^17.3.1",
Expand All @@ -62,12 +59,6 @@
"dependencies": {
"@fortawesome/free-regular-svg-icons": "^7.2.0",
"@fortawesome/free-solid-svg-icons": "^7.2.0",
"@libsql/client": "^0.17.2",
"@octokit/app": "^16.1.2",
"es6-crawler-detect": "^4.0.2",
"ioredis": "^5.10.1",
"nodemailer": "^8.0.5",
"sql-template-tag": "^5.2.1",
"svelte-fa": "^4.0.4",
"yaml": "^2.8.4"
}
Expand Down
Loading