24 setLoading(true);
25 setError('');
26 const response = await fetch(`/api/applications/my/${encodeURIComponent(userEmail)}`);
27
28 if (response.ok) {
19โ โ โโโ queries.ts # Database query functions
20โ โโโ routes/
21โ โ โโโ products.ts # Product API endpoints
22โ โ โโโ orders.ts # Order/checkout endpoints
23โ โโโ index.ts # Main Hono server
58 const fetchMessages = async () => {
59 try {
60 const response = await fetch('/api/chat/messages');
61 if (response.ok) {
62 const messagesData = await response.json();
75 const fetchNewMessages = async () => {
76 try {
77 const response = await fetch(`/api/chat/messages/since/${encodeURIComponent(lastTimestampRef.current)}`);
78 if (response.ok) {
79 const newMessages = await response.json();
98 setIsSending(true);
99 try {
100 const response = await fetch('/api/chat/messages', {
101 method: 'POST',
102 headers: {
26
27 try {
28 const response = await fetch('/api/applications', {
29 method: 'POST',
30 headers: {
18});
19
20// API route for contact form (placeholder)
21app.post("/api/contact", async c => {
22 const body = await c.req.json();
23
27
28 try {
29 const response = await fetch('/api/contact', {
30 method: 'POST',
31 headers: {
21 const fetchJobs = async () => {
22 try {
23 const response = await fetch('/api/jobs');
24 if (response.ok) {
25 const jobsData = await response.json();
17โ โ โโโ queries.ts # Database query functions
18โ โโโ routes/
19โ โ โโโ jobs.ts # Job-related API endpoints
20โ โ โโโ applications.ts # Application API endpoints
21โ โ โโโ chat.ts # Chat API endpoints
22โ โ โโโ static.ts # Static file serving
23โ โโโ index.ts # Main Hono app entry point
38## Tech Stack
39
40- **Backend**: Hono (TypeScript API framework)
41- **Frontend**: React with TypeScript
42- **Database**: SQLite
32```
33
34## API
35
36Currently uses mock data for demonstration. In production, this would integrate with:
37- football-data.org (free tier available)
38- API-Football (RapidAPI)
39- Other football data providers
40
62- **Backend**: Hono (TypeScript)
63- **Frontend**: React 18.2.0 + TailwindCSS
64- **Data**: Free football API
65- **Platform**: Val Townexport default async function (req: Request): Promise<Response> {
66 return Response.json({ ok: true })
34
35 try {
36 const response = await fetch('/api/cart/add', {
37 method: 'POST',
38 headers: {
56
57 // Refresh cart
58 const cartResponse = await fetch('/api/cart', {
59 credentials: 'include'
60 });