This commit is contained in:
Rotimi Best
2026-06-16 20:25:28 +01:00
22 changed files with 1044 additions and 148 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
"dist"
],
"scripts": {
"build": "rm -rf dist tsconfig.tsbuildinfo && tsc && tsc-alias",
"build": "rimraf dist tsconfig.tsbuildinfo && tsc && tsc-alias",
"dev": "tsc --watch",
"format": "prettier --write \"src/**/*.ts\""
},
+3
View File
@@ -0,0 +1,3 @@
# Connection string for the @cio/db scripts (db:setup, db:setup:seed, drizzle-kit).
# Matches the local Postgres started by docker/docker-compose.yaml.
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/classroomio"
+14 -10
View File
@@ -60,7 +60,11 @@ It performs three steps in order:
**Optional:** Add `--seed` (or `-s`) to run the full seed, including demo users, organizations, courses, and other example data.
Requires `DATABASE_URL` or `PRIVATE_DATABASE_URL` in the environment.
Requires `DATABASE_URL` or `PRIVATE_DATABASE_URL` in the environment. The scripts load `.env` from this package directory, so bootstrap it once from the template:
```bash
cp .env.example .env # then set DATABASE_URL for your DB
```
## Seeding
@@ -105,13 +109,13 @@ pnpm seed --organizations --organization-members --organization-plan
### Demo accounts
| Email | Password | Role | Plan |
| -------------------------------- | ---------- | ------- | ------------- |
| `test@test.com` | `password` | Admin | Basic (free) |
| `student@test.com` | `password` | Student | Basic (free) |
| `enterprise@test.com` | `password` | Admin | Enterprise |
| `enterprise-student@test.com` | `password` | Student | Enterprise |
| `early-adopter@test.com` | `password` | Admin | Early Adopter |
| `early-adopter-student@test.com` | `password` | Student | Early Adopter |
| Email | Password | Role | Plan |
| -------------------------------- | -------- | ------- | ------------- |
| `admin@test.com` | `123456` | Admin | Basic (free) |
| `student@test.com` | `123456` | Student | Basic (free) |
| `enterprise@test.com` | `123456` | Admin | Enterprise |
| `enterprise-student@test.com` | `123456` | Student | Enterprise |
| `early-adopter@test.com` | `123456` | Admin | Early Adopter |
| `early-adopter-student@test.com` | `123456` | Student | Early Adopter |
Mock user credentials are defined in `users.json`. The encrypted password above corresponds to the literal string `password`.
Mock user credentials are defined in `users.json`. The demo accounts above use the password `123456`.
+2 -1
View File
@@ -50,9 +50,10 @@
"dist"
],
"scripts": {
"build": "rm -rf dist tsconfig.tsbuildinfo && tsc && tsc-alias",
"build": "rimraf dist tsconfig.tsbuildinfo && tsc && tsc-alias",
"dev": "tsc --watch",
"db": "drizzle-kit",
"db:studio": "drizzle-kit studio",
"db:reset": "tsx src/scripts/db-reset.ts --skip-seed",
"db:setup": "tsx src/scripts/db-setup.ts",
"db:setup:seed": "tsx src/scripts/db-setup.ts --seed",
+4 -1
View File
@@ -22,7 +22,10 @@ async function runPnpmCommand(commandLabel: string, args: string[]) {
const child = spawn(pnpmBinary, args, {
cwd: packageRoot,
env: process.env,
stdio: 'inherit'
stdio: 'inherit',
// On Windows, spawning the pnpm.cmd shim requires a shell since Node's
// CVE-2024-27980 fix (spawning .cmd/.bat without shell throws EINVAL).
shell: process.platform === 'win32'
});
child.on('error', (error) => {
+4 -1
View File
@@ -22,7 +22,10 @@ async function runPnpmCommand(commandLabel: string, args: string[]) {
const child = spawn(pnpmBinary, args, {
cwd: packageRoot,
env: process.env,
stdio: 'inherit'
stdio: 'inherit',
// On Windows, spawning the pnpm.cmd shim requires a shell since Node's
// CVE-2024-27980 fix (spawning .cmd/.bat without shell throws EINVAL).
shell: process.platform === 'win32'
});
child.on('error', (error) => {
+1 -1
View File
@@ -38,7 +38,7 @@
}
},
"scripts": {
"build": "rm -rf dist tsconfig.tsbuildinfo && tsc && tsc-alias",
"build": "rimraf dist tsconfig.tsbuildinfo && tsc && tsc-alias",
"dev": "tsc --watch",
"format": "prettier --write ."
},
+1 -1
View File
@@ -14,7 +14,7 @@
"classroomio-mcp": "./dist/index.js"
},
"scripts": {
"build": "rm -rf dist tsconfig.tsbuildinfo && node ./scripts/build.mjs",
"build": "rimraf dist tsconfig.tsbuildinfo && node ./scripts/build.mjs",
"typecheck": "tsc --noEmit",
"dev": "tsx src/index.ts",
"start": "node dist/index.js",