feat: полный бэк и фронт (попытки, разбор, импорт, ИИ, назначения)

- Сервисы: testAttemptService, testAccess, document import/gen/extract, LLM, assignment, aiEditor
- Конфиг: devAuthor, featureFlags; messages/ru; интеграция V.9 (skip без БД)
- API/роуты: app, auth, server; Dockerfile и env example
- Фронт: TestAttempt, TestAttemptReview, AttemptReviewBlock, стили, правки App/api/login/vite
- compose и README; смоук-тесты расширены

Закрывает отсутствие модулей в origin после клона.

Made-with: Cursor
This commit is contained in:
Константин Лебединский
2026-04-24 22:55:15 +05:00
parent a68331c86b
commit 0fe04d4d99
38 changed files with 3683 additions and 491 deletions
+8 -3
View File
@@ -4,6 +4,7 @@ import cookieParser from 'cookie-parser';
import dotenv from 'dotenv';
import authRoutes from './routes/auth.js';
import testsRoutes from './routes/tests.js';
import { RU } from './messages/ru.js';
dotenv.config();
@@ -14,7 +15,11 @@ export function createApp() {
? process.env.FRONTEND_URL
? [process.env.FRONTEND_URL]
: []
: ['http://localhost:5173', 'http://localhost:3000'];
: [
'http://localhost:5173',
'http://localhost:3000',
'http://localhost:8080',
];
app.use(
cors({
origin: corsOrigins.length ? corsOrigins : true,
@@ -35,11 +40,11 @@ export function createApp() {
app.use((err, req, res, _next) => {
console.error('Error:', err);
res.status(err.status || 500).json({
error: err.message || 'Internal Server Error',
error: err.message || RU.internal,
});
});
app.use((req, res) => {
res.status(404).json({ error: 'Not found' });
res.status(404).json({ error: RU.notFound });
});
return app;
}