Files
AnchorOS/package.json
Marco Gallegos e33a9a4573 feat(critical): Implement critical Aperture features
TASK 1: Implement GET /api/aperture/stats
- Create endpoint at app/api/aperture/stats/route.ts
- Returns dashboard statistics: { totalBookings, totalRevenue, completedToday, upcomingToday }
- Calculates stats from bookings table by month and today
- Dashboard now has functional statistics display

TASK 2: Implement authentication for Aperture
- Create middleware.ts for protecting Aperture routes
- Only allows access to users with admin, manager, or staff roles
- Redirects unauthorized users to /aperture/login
- Uses Supabase Auth with session verification
- Integrates with existing AuthProvider in lib/auth/context.tsx

Stack Updates:
- Update @supabase/auth-helpers-nextjs to latest version (0.15.0)
- Note: Package marked as deprecated but still functional

Files Created:
- app/api/aperture/stats/route.ts
- middleware.ts

Files Modified:
- TASKS.md (marked tasks 1 and 2 as completed)
- package.json (updated dependency)

Impact:
- Aperture dashboard now has working statistics
- Aperture routes are now protected by authentication
- Only authorized staff/admin/manager can access dashboard

Next: Task 3 - Implement weekly invitation reset
2026-01-17 10:48:40 -06:00

56 lines
1.6 KiB
JSON

{
"name": "anchoros",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev -p 2311",
"build": "next build",
"start": "next start",
"lint": "next lint",
"typecheck": "tsc --noEmit",
"db:migrate": "./db/migrate.sh",
"db:verify": "node scripts/verify-migration.js",
"db:seed": "node scripts/seed-data.js",
"simple:check": "./scripts/check-connection.sh",
"simple:verify": "./scripts/simple-verify.sh",
"simple:seed": "./scripts/simple-seed.sh",
"auth:create": "node scripts/create-auth-users.js"
},
"dependencies": {
"@hookform/resolvers": "^3.3.3",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-tabs": "^1.1.13",
"@stripe/react-stripe-js": "^5.4.1",
"@stripe/stripe-js": "^8.6.1",
"@supabase/auth-helpers-nextjs": "^0.15.0",
"@supabase/supabase-js": "^2.38.4",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"date-fns": "^3.0.6",
"date-fns-tz": "^3.2.0",
"framer-motion": "^10.16.16",
"lucide-react": "^0.303.0",
"next": "14.0.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.49.2",
"stripe": "^20.2.0",
"tailwind-merge": "^2.6.0",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/node": "^20.10.5",
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.18",
"autoprefixer": "^10.4.16",
"dotenv": "^16.3.1",
"eslint": "^8.56.0",
"eslint-config-next": "14.0.4",
"postcss": "^8.4.32",
"tailwindcss": "^3.4.0",
"typescript": "^5.3.3"
}
}