feat: add city/state/country to complex, new settings page with sidebar, and Biome linting
- Added city, state, and country optional fields to Complex model - Updated onboarding to include optional location fields - Created new settings page with sidebar navigation (Datos del Complejo, Canchas) - Replaced ESLint with Biome for frontend and backend linting - Added parallel dev script with concurrently - Migrated register-routes to use direct app.route() pattern
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import type { Hono } from 'hono'
|
||||
import { serveStatic } from 'hono/bun'
|
||||
import path from 'node:path'
|
||||
import { adminBookingRoutes } from '@/modules/admin-booking/admin-booking.routes'
|
||||
import { complexRoutes } from '@/modules/complex/complex.routes'
|
||||
import { courtRoutes } from '@/modules/court/court.routes'
|
||||
import { onboardingRoutes } from '@/modules/onboarding/onboarding.routes'
|
||||
import { planRoutes } from '@/modules/plan/plan.routes'
|
||||
import { publicBookingRoutes } from '@/modules/public-booking/public-booking.routes'
|
||||
import { sportRoutes } from '@/modules/sport/sport.routes'
|
||||
import { userRoutes } from '@/modules/user/user.routes'
|
||||
import type { AppEnv } from '@/types/hono'
|
||||
import { healthCheckRoutes } from './modules/health-check/health-check.routes'
|
||||
import path from 'node:path';
|
||||
import { adminBookingRoutes } from '@/modules/admin-booking/admin-booking.routes';
|
||||
import { complexRoutes } from '@/modules/complex/complex.routes';
|
||||
import { courtRoutes } from '@/modules/court/court.routes';
|
||||
import { onboardingRoutes } from '@/modules/onboarding/onboarding.routes';
|
||||
import { planRoutes } from '@/modules/plan/plan.routes';
|
||||
import { publicBookingRoutes } from '@/modules/public-booking/public-booking.routes';
|
||||
import { sportRoutes } from '@/modules/sport/sport.routes';
|
||||
import { userRoutes } from '@/modules/user/user.routes';
|
||||
import type { AppEnv } from '@/types/hono';
|
||||
import type { Hono } from 'hono';
|
||||
import { serveStatic } from 'hono/bun';
|
||||
import { healthCheckRoutes } from './modules/health-check/health-check.routes';
|
||||
|
||||
export function registerRoutes(app: Hono<AppEnv>) {
|
||||
app
|
||||
@@ -22,24 +22,24 @@ export function registerRoutes(app: Hono<AppEnv>) {
|
||||
.route('/api/courts', courtRoutes)
|
||||
.route('/api/public-bookings', publicBookingRoutes)
|
||||
.route('/api/admin-bookings', adminBookingRoutes)
|
||||
.route('/api/health', healthCheckRoutes)
|
||||
.route('/api/health', healthCheckRoutes);
|
||||
|
||||
app.use('*', serveStatic({ root: './public' }))
|
||||
app.use('*', serveStatic({ root: './public' }));
|
||||
app.get('*', async (c) => {
|
||||
if (c.req.path === '/api' || c.req.path.startsWith('/api/')) {
|
||||
return c.notFound()
|
||||
return c.notFound();
|
||||
}
|
||||
|
||||
// Keep real asset URLs as 404s if the file does not exist.
|
||||
if (path.extname(c.req.path)) {
|
||||
return c.notFound()
|
||||
return c.notFound();
|
||||
}
|
||||
|
||||
const indexFile = Bun.file('./public/index.html')
|
||||
const indexFile = Bun.file('./public/index.html');
|
||||
if (!(await indexFile.exists())) {
|
||||
return c.notFound()
|
||||
return c.notFound();
|
||||
}
|
||||
|
||||
return c.html(await indexFile.text())
|
||||
})
|
||||
return c.html(await indexFile.text());
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user