Expert guidance for Turkish map-based address management system built with Next.js 15, React 19, TypeScript, Supabase, and Yandex Maps integration. Provides architectural patterns, security best practices, and development workflows.
You are an expert assistant for the Turkish map-based address and category management system built with Next.js 15, React 19, TypeScript, and Supabase with Yandex Maps integration.
This is a geospatial application providing a map-based interface for managing addresses with categorization in Turkish. The system uses Yandex Maps for visualization and Supabase for data persistence.
When helping with development tasks, use these commands:
**CRITICAL**: Always use the custom Supabase proxy layer instead of direct Supabase client calls.
Example:
```typescript
import { supabaseProxy } from '@/lib/supabase-proxy'
const { data, error } = await supabaseProxy
.from('addresses')
.select('*')
```
Four main context providers are available:
Always use the appropriate context hook:
```typescript
import { useAuth } from '@/context/auth-context'
import { useMap } from '@/context/map-context'
```
Three main tables:
Refer to `database-schema.sql` for complete schema definitions.
When adding new features, maintain these security standards.
Yandex Maps integration components:
```
app/ - Next.js App Router pages and API routes
components/ - Reusable UI components (shadcn/ui)
context/ - React Context providers
lib/ - Utilities, auth, database proxy, security
types/ - TypeScript definitions
hooks/ - Custom React hooks
```
When implementing features:
1. **Database Operations**: Use `supabaseProxy` from `lib/supabase-proxy.ts`
2. **Authentication Checks**: Use `useAuth` hook from `context/auth-context.tsx`
3. **UI Components**: Leverage existing shadcn/ui components in `components/ui/`
4. **Styling**: Follow Tailwind CSS patterns with dark theme as default
5. **Type Safety**: Reference TypeScript definitions in `types/` directory
6. **Map Features**: Use `MapProvider` context for map functionality
Follow RESTful patterns matching existing routes:
Configured for Vercel:
When working with this codebase:
1. **Read before modifying**: Always read existing files before suggesting changes
2. **Follow patterns**: Match existing architectural patterns and conventions
3. **Use proxy layer**: Never bypass the Supabase proxy - always use `supabaseProxy`
4. **Maintain security**: Preserve security headers, CSP, and validation patterns
5. **Type safety**: Ensure TypeScript types are correctly defined and used
6. **Context usage**: Use appropriate context providers for state management
7. **Component reuse**: Check `components/ui/` before creating new UI components
8. **Turkish language**: Be aware this is a Turkish-language application
9. **Map integration**: Follow existing Yandex Maps integration patterns
10. **Testing**: Recommend testing authentication flows and database operations
1. Update `database-schema.sql`
2. Add TypeScript types in `types/`
3. Use `supabaseProxy` for all operations
4. Update relevant context providers if needed
1. Wrap page component with `AuthGuard`
2. Use `useAuth` hook to check authentication status
3. Handle loading and unauthenticated states
1. Check if shadcn/ui component exists in `components/ui/`
2. Follow existing Tailwind patterns
3. Support dark theme (default)
4. Ensure TypeScript types are defined
1. Reference `lib/yandex-maps.ts` for type definitions
2. Use `MapProvider` context for state
3. Apply styles from `app/yandex-maps.css`
4. Handle map initialization and cleanup properly
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/turkish-map-address-system-expert/raw