Skip to content

Commit d915c5f

Browse files
author
VORTEX
committed
feat(platform): add Drizzle schema, seed pipeline, CI, Docker and OSS docs
1 parent fbadc76 commit d915c5f

File tree

17 files changed

+26638
-0
lines changed

17 files changed

+26638
-0
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DATABASE_URL=postgres://postgres:postgres@localhost:5432/spanish

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: CI
2+
on: [push, pull_request]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v4
8+
- uses: actions/setup-node@v4
9+
with: { node-version: 22 }
10+
- run: npm ci
11+
- run: npm run lint
12+
- run: npm run test
13+
- run: npm run build
14+
- run: docker build -t spanish-open-source .

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts
42+
43+
!.env.example

ATTRIBUTION.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Attribution
2+
This project includes inspired mechanics from language-learning patterns (XP, streak, SRS) and uses open-source libraries listed in LICENSES.md.

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM node:22-alpine AS deps
2+
WORKDIR /app
3+
COPY package*.json ./
4+
RUN npm ci
5+
FROM node:22-alpine AS builder
6+
WORKDIR /app
7+
COPY --from=deps /app/node_modules ./node_modules
8+
COPY . .
9+
RUN npm run build
10+
FROM node:22-alpine AS runner
11+
WORKDIR /app
12+
ENV NODE_ENV=production
13+
COPY --from=builder /app/.next ./.next
14+
COPY --from=builder /app/public ./public
15+
COPY --from=builder /app/package*.json ./
16+
COPY --from=builder /app/node_modules ./node_modules
17+
EXPOSE 3000
18+
CMD ["npm","run","start"]

LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
MIT License
2+
3+
Copyright (c) 2026
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.

LICENSES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Third-party Licenses
2+
- Next.js (MIT)
3+
- React (MIT)
4+
- Tailwind CSS (MIT)
5+
- Drizzle ORM (Apache-2.0)
6+
- PostgreSQL client `pg` (MIT)

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# HablaFlow (spanish-open-source)
2+
3+
Open-source Spaanse leerapp met Duolingo-achtige mechanics, gebouwd met Next.js App Router + TypeScript + Tailwind + Drizzle + PostgreSQL + Docker.
4+
5+
## Features
6+
- 120 lessen (A1/A2)
7+
- 2640 zinnen (offline seedbaar)
8+
- 10 exercise types
9+
- XP + streak + SM-2 SRS
10+
- Admin panel (`/admin`)
11+
- Vocabulary browser (`/vocab`)
12+
- API endpoints voor progress en admin
13+
14+
## Local run
15+
```bash
16+
npm install
17+
npm run lint
18+
npm run test
19+
npm run build
20+
docker build -t spanish-open-source .
21+
docker compose up --build
22+
```
23+
24+
## Database
25+
```bash
26+
cp .env.example .env
27+
npm run db:generate
28+
npm run db:migrate
29+
npm run db:seed
30+
```
31+
32+
## Offline curriculum artifact
33+
```bash
34+
npm run seed:offline
35+
```

docker-compose.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
services:
2+
db:
3+
image: postgres:16-alpine
4+
environment:
5+
POSTGRES_DB: spanish
6+
POSTGRES_USER: postgres
7+
POSTGRES_PASSWORD: postgres
8+
ports: ["5432:5432"]
9+
volumes: ["pgdata:/var/lib/postgresql/data"]
10+
app:
11+
build: .
12+
environment:
13+
DATABASE_URL: postgres://postgres:postgres@db:5432/spanish
14+
ports: ["3000:3000"]
15+
depends_on: [db]
16+
volumes:
17+
pgdata:

drizzle.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import "dotenv/config";
2+
import { defineConfig } from "drizzle-kit";
3+
export default defineConfig({ schema: "./src/db/schema.ts", out: "./drizzle", dialect: "postgresql", dbCredentials: { url: process.env.DATABASE_URL || "postgres://postgres:postgres@localhost:5432/spanish" } });

0 commit comments

Comments
 (0)