feat: setup drizzle (#594)

* chore: migration to SvelteKit 2

* stage 1: migrate to svelte 5 and fix rerendering issues

* stage 2: fix more $: reactivity across dashboard

* fix merge conflicts

* chore: migrate code in main to svelte 5

* chore: update preventDefault

* chore: simplify tsconfig and remove unused mobileMenuRef in MobileMenu.svelte

* chore: enforce .ts across dashboard

* rename from classroomio-com to website

* stage-3: Replace carbon icon svelte with lucide icon

* update lock file

* chore: finish icon replacement

* fix: settings and setup page multiple rerender

* stage 3: More icon and rerendering fixes

* feat: setup drizzle and better auth

* fix: onboarding validation error showing translation key #586 (#593)

* fix: onboarding validation error showing translation key #586

* fix: remove debug log for profile update errors

* chore: add a clean command

* fix: remove message from email verification response
This commit is contained in:
Rotimi Best
2025-11-01 15:49:29 +01:00
committed by GitHub
parent 97fb446df5
commit b96d91cd7c
801 changed files with 22279 additions and 10834 deletions
@@ -0,0 +1,71 @@
interface Tool {
src: string;
title: string;
subText: string;
slug: string;
show: boolean;
showFeature: boolean;
}
export const tools: Tool[] = [
{
src: '/free-tools/progress-report.svg',
title: 'Progress Report',
subText: 'Monitor your progress with a system to check and share your progress with others',
slug: 'progress',
show: true,
showFeature: true
},
{
src: '/free-tools/pomodoro.svg',
title: 'Pomodoro Timer',
subText:
'Make your workday more engaging and effective with the Pomodoro timer, break work into 25-minute focused intervals called "pomodoros".',
slug: 'pomodoro',
show: true,
showFeature: false
},
{
src: '/free-tools/name-picker.svg',
title: 'Random Name Picker',
subText: 'Effortlessly choose names for class participation or group activities',
slug: 'name-picker',
show: true,
showFeature: false
},
{
src: '/free-tools/activity-stopwatch.svg',
title: 'Activity Stopwatch',
subText:
'Stay on track and enhance productivity with our customizable stopwatch for timed tasks, quizzes, and study sessions',
slug: 'stopwatch',
show: true,
showFeature: true
},
{
src: '/free-tools/tic-tac.svg',
title: 'Tic tac toe game',
subText:
"More than just a game; it's an educational tool that teaches pattern recognition, and decision-making.",
slug: 'tic-tac-toe',
show: true,
showFeature: true
},
{
src: '/free-tools/waec.svg',
title: 'WAEC Practice tool',
subText: 'Ace your WAEC exams with comprehensive study materials, past questions',
slug: 'waec',
show: false,
showFeature: false
},
{
src: '/free-tools/jamb.svg',
title: 'JAMB Practice tool',
subText:
'Prepare for JAMB with past questions and instant feedback for effective exam readiness',
slug: 'jamb',
show: false,
showFeature: false
}
];
+8
View File
@@ -0,0 +1,8 @@
type DateStyle = Intl.DateTimeFormatOptions['dateStyle'];
export function formatDate(date: string, dateStyle: DateStyle = 'medium', locales = 'en') {
// Safari is mad about dashes in the date
const dateToFormat = new Date(date.replaceAll('-', '/'));
const dateFormatter = new Intl.DateTimeFormat(locales, { dateStyle });
return dateFormatter.format(dateToFormat);
}
@@ -0,0 +1,8 @@
export const isFormValid = (data: { [x: string]: any }) => {
for (const key in data) {
if (!data[key]) {
return false;
}
}
return true;
};
@@ -0,0 +1,9 @@
import { PostHog } from 'posthog-node';
export const client = new PostHog(
'phc_JfdHOZ6v0cVlGELBYx1Tmoen2nxNOrAzvgvrPA6Ksov',
{ host: 'https://app.posthog.com' }
);
await client.shutdownAsync();
+20
View File
@@ -0,0 +1,20 @@
export const submitForm = async (formData: any) => {
try {
const response = await fetch('/api/contact', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(formData)
});
if (!response.ok) {
throw new Error('Failed to submit the form');
}
const data = await response.json();
console.log('Response from API:', data);
} catch (error) {
console.error('Error submitting form:', error);
}
};