production configs, deployment configs and readme

This commit is contained in:
mikicvi
2025-09-28 13:35:08 +01:00
parent b95a2ab2e4
commit 429eebb68f
15 changed files with 1115 additions and 44 deletions
+2 -1
View File
@@ -5,7 +5,8 @@ import { sql, eq } from 'drizzle-orm';
import { randomUUID } from 'crypto';
import bcrypt from 'bcryptjs';
const sqlite = new Database('./sqlite.db');
const dbPath = process.env.DATABASE_URL || './data/sqlite.db';
const sqlite = new Database(dbPath);
const db = drizzle(sqlite, { schema });
interface SetupOptions {
-41
View File
@@ -1,41 +0,0 @@
#!/usr/bin/env node
// Test script to verify Irish localization settings
console.log('🇮🇪 Testing Irish Localization Settings\n');
console.log('1. Week starts on Monday (Irish standard)');
console.log(' JavaScript getDay() values:');
console.log(' Sunday = 0, Monday = 1, ..., Saturday = 6');
console.log(' Irish display order should be: Monday, Tuesday, ..., Sunday\n');
// Test date formatting
const testDate = new Date('2025-09-25'); // This is a Thursday
console.log('2. Date Formatting Test:');
console.log(` Test date: ${testDate.toDateString()}`);
console.log(
` Irish format (en-IE): ${testDate.toLocaleDateString('en-IE', {
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric',
})}`
);
console.log(` Irish short format: ${testDate.toLocaleDateString('en-IE', { weekday: 'short' })}`);
console.log('\n3. Day of Week Conversion:');
const daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
for (let jsDay = 0; jsDay <= 6; jsDay++) {
const irishDisplayOrder = jsDay === 0 ? 6 : jsDay - 1; // Convert Sunday(0) to position 6, others shift down
console.log(` JS Day ${jsDay} (${daysOfWeek[jsDay]}) -> Irish position ${irishDisplayOrder}`);
}
console.log('\n4. Week Structure for Admin Panel:');
const irishWeekOrder = [1, 2, 3, 4, 5, 6, 0]; // Monday through Sunday in JS values
irishWeekOrder.forEach((jsDay, displayIndex) => {
console.log(` Display position ${displayIndex}: ${daysOfWeek[jsDay]} (JS day ${jsDay})`);
});
console.log('\n✅ Irish localization configuration complete!');
console.log('📅 Calendar will now start with Monday');
console.log('🇮🇪 All dates will use en-IE locale format');
console.log('⏰ 24-hour time format maintained');