Frontend: - Replace Next.js with Vite + React + TypeScript - Add new component architecture (app-shell, sidebar, dashboard modules) - Implement product modules: FRAME, safety protocols, walkthrough checkin, campus/staff attendance, personality quiz, sign language, classroom timer - Add shadcn/ui component library with Tailwind CSS - Remove legacy generated components, stores, and pages Backend: - Add product migrations: frame_entries, user_progress, safety_quiz_results, walkthrough_checkins, communication_events, personality_quiz_results, campus_attendance_config/summaries, staff_attendance_records, content_catalog - Add corresponding models, services, and routes - Implement cookie-based auth with refresh token rotation - Add content catalog seeder with product content - Migrate to ESLint flat config - Switch from yarn to npm Infrastructure: - Update .gitignore for new tooling - Add project documentation (CLAUDE.md, docs/) - Remove deprecated config files and yarn.lock Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
44 lines
1.0 KiB
JavaScript
44 lines
1.0 KiB
JavaScript
const AUTH_PROVIDERS = Object.freeze({
|
|
LOCAL: 'local',
|
|
GOOGLE: 'google',
|
|
MICROSOFT: 'microsoft',
|
|
});
|
|
|
|
const BCRYPT_SALT_ROUNDS = 12;
|
|
const JWT_EXPIRES_IN = '15m';
|
|
const JWT_EXPIRES_IN_MS = 15 * 60 * 1000;
|
|
const AUTH_COOKIE_NAME = 'school_chain_session';
|
|
const AUTH_REFRESH_COOKIE_NAME = 'school_chain_refresh';
|
|
const AUTH_COOKIE_PATH = '/';
|
|
const REFRESH_TOKEN_EXPIRES_IN_MS = 14 * 24 * 60 * 60 * 1000;
|
|
const REFRESH_TOKEN_BYTES = 64;
|
|
const REFRESH_TOKEN_HASH_ALGORITHM = 'sha256';
|
|
const AUTH_COOKIE_SAME_SITE_VALUES = Object.freeze([
|
|
'strict',
|
|
'lax',
|
|
'none',
|
|
]);
|
|
const DEFAULT_AUTH_COOKIE_SAME_SITE = 'lax';
|
|
const UNSAFE_HTTP_METHODS = Object.freeze([
|
|
'POST',
|
|
'PUT',
|
|
'PATCH',
|
|
'DELETE',
|
|
]);
|
|
|
|
module.exports = {
|
|
AUTH_PROVIDERS,
|
|
AUTH_COOKIE_NAME,
|
|
AUTH_REFRESH_COOKIE_NAME,
|
|
AUTH_COOKIE_PATH,
|
|
AUTH_COOKIE_SAME_SITE_VALUES,
|
|
BCRYPT_SALT_ROUNDS,
|
|
DEFAULT_AUTH_COOKIE_SAME_SITE,
|
|
JWT_EXPIRES_IN,
|
|
JWT_EXPIRES_IN_MS,
|
|
REFRESH_TOKEN_BYTES,
|
|
REFRESH_TOKEN_EXPIRES_IN_MS,
|
|
REFRESH_TOKEN_HASH_ALGORITHM,
|
|
UNSAFE_HTTP_METHODS,
|
|
};
|