Akashdatabase.ts9 matches
78// Initialize database tables
9export async function initDatabase() {
10// Create resumes table
11await sqlite.execute(`
3738// Resume operations
39export async function saveResume(resume: Resume): Promise<number> {
40const { candidateName, email, phone, resumeText, parsedData, score, createdAt } = resume;
41
59}
6061export async function getResume(id: number): Promise<Resume | null> {
62const result = await sqlite.execute(
63`SELECT * FROM ${RESUMES_TABLE} WHERE id = ?`,
82}
8384export async function getAllResumes(): Promise<Resume[]> {
85const result = await sqlite.execute(`SELECT * FROM ${RESUMES_TABLE} ORDER BY createdAt DESC`);
86
97}
9899export async function updateResumeScore(id: number, score: number): Promise<void> {
100await sqlite.execute(
101`UPDATE ${RESUMES_TABLE} SET score = ? WHERE id = ?`,
104}
105106export async function updateParsedData(id: number, parsedData: ParsedResumeData): Promise<void> {
107await sqlite.execute(
108`UPDATE ${RESUMES_TABLE} SET parsedData = ? WHERE id = ?`,
112113// Job requirement operations
114export async function saveJobRequirement(job: JobRequirement): Promise<number> {
115const { title, description, requiredSkills, preferredSkills, minimumExperience, createdAt } = job;
116
133}
134135export async function getJobRequirement(id: number): Promise<JobRequirement | null> {
136const result = await sqlite.execute(
137`SELECT * FROM ${JOB_REQUIREMENTS_TABLE} WHERE id = ?`,
155}
156157export async function getAllJobRequirements(): Promise<JobRequirement[]> {
158const result = await sqlite.execute(`SELECT * FROM ${JOB_REQUIREMENTS_TABLE} ORDER BY createdAt DESC`);
159
1// Shared utility functions for both frontend and backend
23/**
5* Simple implementation for demonstration purposes
6*/
7export function calculateSimilarity(str1: string, str2: string): number {
8const s1 = str1.toLowerCase();
9const s2 = str2.toLowerCase();
27* Formats a date string to a readable format
28*/
29export function formatDate(dateString: string): string {
30if (!dateString) return '';
31
45* Validates an email address
46*/
47export function isValidEmail(email: string): boolean {
48const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
49return emailRegex.test(email);
54* This is a simple implementation - in production, you'd use NLP
55*/
56export function extractSkills(text: string, skillsList: string[]): string[] {
57const textLower = text.toLowerCase();
58return skillsList.filter(skill =>
64* Truncates text to a specified length
65*/
66export function truncateText(text: string, maxLength: number): string {
67if (text.length <= maxLength) return text;
68return text.substring(0, maxLength) + '...';
27└── shared/
28├── types.ts # Shared type definitions
29└── utils.ts # Utility functions
30```
31
linkInBioTemplatemain.tsx1 match
2import { renderToString } from "npm:react-dom/server";
34export default async function(req: Request) {
5return new Response(
6renderToString(
9- **Church Information**: Dedicated About page with vision and mission statements
10- **Department Showcase**: Detailed information about church departments (Choir, Media Tech, Ushering, Evangelism, Home Cell)
11- **Sermon Archive**: Access to recorded sermons with playback functionality
12- **Live Streaming**: Built-in live stream player for church services
13- **Mobile-Friendly**: Fully responsive design that works on all devices
30- Modern font pairing (Inter and Playfair Display)
31- Font Awesome icons for visual elements
32- YouTube embed for live streaming functionality
33- Mobile menu with toggle functionality
34- Interactive sermon player with modal functionality
3536## Customization
522. Set up live streaming on your YouTube channel
533. Replace "EXAMPLE_CHANNEL_ID" in the iframe src with your actual YouTube channel ID
544. Test the live stream functionality before going live
5556## Contact Form
5758The contact form is set up for demonstration purposes. To make it functional:
59601. Add form submission handling code
1// Church Website - Main Entry Point
2export default async function(req: Request) {
3const url = new URL(req.url);
4const path = url.pathname;
embed-servicesembed-cron.tsx1 match
11`;
12const text = "";
13export default async function(interval: Interval) {
14const key = "fa6c59cba4de673c53b811075d3f53eae25e6d6b76db1fc70e303a6999189557";
15const uuid = "9f3d2109-a7ca-462ff-c2f6-280023caf17f";
1export default async function (req: Request): Promise<Response> {
2return Response.json({ ok: true })
3}
16171. **Home**: Landing page with hero section, featured cars, and key benefits
182. **Cars**: Browse all available cars with filtering and search functionality
193. **Car Detail**: Detailed information about a specific car
204. **Booking**: Multi-step booking process
138fuelType: 'Petrol',
139seats: 4,
140description: 'The iconic Porsche 911 continues to set the standard for sports cars. With its distinctive design, exceptional performance, and everyday usability, it\'s the perfect blend of form and function.',
141features: [
142'Sport Chrono Package',
259];
260261// Function to get car by ID
262export const getCarById = (id) => {
263return cars.find(car => car.id === parseInt(id));
264};
265266// Function to filter cars by category
267export const getCarsByCategory = (category) => {
268if (!category || category === 'All') return cars;
276};
277278// Function to search cars
279export const searchCars = (query) => {
280if (!query) return cars;