25489a733a
content/phys/ct-2024.yaml — 15 questions from ЦЭ,ЦТ 2024 across 6 topics (kinem, mol, emf, electro, magnet, optics) as proof of format. backend/scripts/import-content.js — unified importer: - Validates schema (subject, year, options, exactly-1-correct) - Aliases (kinem, mol, ...) resolve to Russian topic names via get-or-create - Deduplicates by first 80 chars of text (matches legacy seed_*.js behavior) - Runs in a single transaction, idempotent re-runs On fresh DB: 13 added (2 dedup collisions — same 80-char prefix, expected). On prod DB: 0 added (all already exist from legacy seeds). Second run on either: 0 added (dedup works). Legacy seed_phys_ct2024.js kept as backup — see content/README.md for migration guide. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
830 B
JSON
32 lines
830 B
JSON
{
|
|
"name": "learnspace-backend",
|
|
"version": "1.0.0",
|
|
"description": "LearnSpace backend",
|
|
"main": "src/server.js",
|
|
"scripts": {
|
|
"start": "node src/server.js",
|
|
"dev": "nodemon src/server.js",
|
|
"migrate": "node src/db/migrate.js",
|
|
"seed": "node src/db/seed.js",
|
|
"seed:permissions": "node src/db/seed-permissions.js",
|
|
"lint:routes": "node scripts/check-route-auth.js",
|
|
"import:content": "node scripts/import-content.js",
|
|
"test": "node --test tests/*.test.js"
|
|
},
|
|
"dependencies": {
|
|
"bcryptjs": "^2.4.3",
|
|
"compression": "^1.8.1",
|
|
"cors": "^2.8.5",
|
|
"dotenv": "^16.4.5",
|
|
"express": "^4.18.3",
|
|
"js-yaml": "^4.1.1",
|
|
"jsonwebtoken": "^9.0.2",
|
|
"multer": "^2.1.1",
|
|
"sharp": "^0.34.5",
|
|
"ws": "^8.20.0"
|
|
},
|
|
"devDependencies": {
|
|
"nodemon": "^3.1.0"
|
|
}
|
|
}
|