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
21 changes: 9 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,16 @@ scripts_dir := ./scripts
help:
@cat $(scripts_dir)/help.txt

.PHONY: setup_compose
setup_compose:
$(scripts_dir)/setup_compose.sh

.PHONY: build
build: setup_compose
$(compose) build

.PHONY: setup_web
setup_web: build
$(scripts_dir)/setup_web.sh
# Native
.PHONY: dev
dev:
@$(scripts_dir)/setup_native.sh
cd web && pnpm run dev

# Docker Compose
.PHONY: up
up: setup_web
up:
@$(scripts_dir)/setup_compose.sh
$(compose) up -d

.PHONY: down
Expand All @@ -33,3 +29,4 @@ logs:
shell:
$(compose) run --rm web bash


14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,23 @@

## Run

Choose your preferred development environment:

### Native

```bash
make dev
```

### Docker Compose

```bash
make
make up
```

## Tech Stack

- Docker Compose
- TypeScript
- React
- Next.js
- MDX
16 changes: 10 additions & 6 deletions scripts/help.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
usage: make [command]

General:
help: Show this help message
up: Launch the project in detached mode
setup_web: Prepare the web container for development
build: Build the project using docker compose
setup_compose: Run initial setup scripts for docker compose
down: Take down the containers
logs: Follow logs

Native:
dev: Set up and start the development server natively

Docker Compose:
up: Set up and start the development server in Docker
down: Stop the Docker containers
logs: Follow Docker container logs
shell: Open a bash shell in the web container
18 changes: 16 additions & 2 deletions scripts/setup_compose.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
#!/bin/env bash
#!/usr/bin/env bash

set -e

echo "Setting up docker compose environment..."

if [ ! -f compose.override.yaml ]; then
echo "compose.override.yaml not found, creating from example"
echo "Creating compose.override.yaml..."
cp compose.override.example.yaml compose.override.yaml
fi

echo "Building containers..."
docker compose build

if [ ! -d web/node_modules ]; then
echo "Installing dependencies in container..."
docker compose run --rm web pnpm install
fi

echo "Docker compose setup complete!"
19 changes: 19 additions & 0 deletions scripts/setup_native.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -e

echo "Setting up native environment..."

cd web

if ! command -v pnpm &> /dev/null; then
echo "Error: pnpm is not installed"
exit 1
fi

if [ ! -d node_modules ]; then
echo "Installing dependencies..."
pnpm install
fi

echo "Native setup complete!"
6 changes: 0 additions & 6 deletions scripts/setup_web.sh

This file was deleted.

2 changes: 1 addition & 1 deletion web/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />
import "./.next/dev/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
1 change: 1 addition & 0 deletions web/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import createMDX from "@next/mdx";
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
cacheComponents: true,
experimental: {
// typedRoutes: true,
// mdxRs: true,
Expand Down
28 changes: 19 additions & 9 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack -p 4200",
"build": "next build --turbopack",
"dev": "next dev -p 4200",
"build": "next build",
"start": "next start -p 4200",
"lint": "biome lint",
"lint:fix": "biome lint --write",
Expand All @@ -21,7 +21,7 @@
"@highlightjs/cdn-assets": "^11.11.1",
"@mdx-js/loader": "^3.1.1",
"@mdx-js/react": "^3.1.1",
"@next/mdx": "^15.5.4",
"@next/mdx": "16.0.3",
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-radio-group": "^1.3.8",
Expand All @@ -35,19 +35,19 @@
"@types/mdx": "^2.0.13",
"@types/node": "^24.6.0",
"@types/papaparse": "^5.3.16",
"@types/react": "^19.1.16",
"@types/react-dom": "^19.1.9",
"@types/react": "19.2.5",
"@types/react-dom": "19.2.3",
"@types/three": "^0.180.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"katex": "^0.16.22",
"lucide-react": "^0.544.0",
"next": "^15.5.4",
"next": "16.0.3",
"next-themes": "^0.4.6",
"papaparse": "^5.5.3",
"postcss": "^8.5.6",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"react": "19.2.0",
"react-dom": "19.2.0",
"recharts": "^3.2.1",
"rehype-autolink-headings": "^7.1.0",
"rehype-highlight": "^7.0.2",
Expand All @@ -65,5 +65,15 @@
"devDependencies": {
"@biomejs/biome": "2.2.4"
},
"packageManager": "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34"
"packageManager": "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34",
"pnpm": {
"overrides": {
"@types/react": "19.2.5",
"@types/react-dom": "19.2.3"
},
"onlyBuiltDependencies": [
"@tailwindcss/oxide",
"sharp"
]
}
}
Loading