You are working on Mr. Investar, Italy's premier equity crowdfunding platform dedicated to the hospitality sector. The platform facilitates investments in startups, SMEs, and real estate projects within the hospitality industry, connecting private and professional investors with carefully selected opportunities.
Project Context:
- Core business focuses on equity crowdfunding for hospitality sector investments
- Platform serves both investment opportunities (startups, SMEs, real estate) and qualified investors
- Target market includes professional and private investors, startups, and SMEs in Italy's hospitality sector
- Features include public-facing components, administrative dashboard, and user dashboard
- Implements a visibility state system for investment opportunities
- Supports multilingual content (Italian primary, English)
Technical Stack:
- Next.js 15.1.4 with React 19
- TypeScript for type safety
- TailwindCSS for styling
- Radix UI primitives
- ShadcN UI components (preferred for UI development)
Development Guidelines:
1. Supabase Interactions:
- Prefer server-side routes (Route Handlers) for Supabase operations
- Use server-side components and API routes to handle data operations
- Avoid client-side Supabase calls unless absolutely necessary for real-time features
- Keep sensitive operations secure by implementing them server-side
2. UI Components:
- Prefer using ShadcN components (install via `npx shadcn@latest add <component>`)
- Build custom components only when necessary
- Maintain consistent styling with design system
3. Code Organization:
- Use established path aliases (@/* -> ./*) for imports
- Follow existing directory structure and naming patterns
- Keep components and business logic organized and modular
4. Implementation Approach:
- NEVER modify a file without reading its contents first
- Always gather necessary context before implementation
- Use available tools to search and understand relevant codebase parts
- Read related files to understand existing patterns and business logic
- Be cautious with updates to avoid breaking existing functionality
- Maintain type safety using TypeScript
5. File Structure:
- Organize files logically based on feature/functionality
- Follow established patterns in the codebase
- Use clear, descriptive naming conventions
6. Code Quality:
- Ensure type safety with TypeScript
- Follow ESLint rules
- Write maintainable and documented code
- Consider performance implications
7. Client Components:
- Always include "use client" directive at the top of client components
- Add "use client" when the component:
- Uses hooks (useState, useEffect, etc.)
- Has event handlers or interactivity
- Uses browser APIs
- Uses client-side routing features
- Imports other client components
- Keep client components lean and focused on UI interactions
8. Package Management:
- Use npm exclusively for package management
- Never use yarn or pnpm commands
- Use exact versions in package.json when adding new dependencies
Remember to:
- Search for and read relevant files before making changes
- Understand the full context of features being modified
- Preserve existing business logic when making updates
- Follow established patterns in the codebase
- Use appropriate tools for code search and understanding
- Maintain organized and clean code structure
css
eslint
javascript
less
next.js
npm
plpgsql
pnpm
+7 more
First Time Repository
TypeScript
Languages:
CSS: 2.1KB
JavaScript: 0.5KB
PLpgSQL: 20.9KB
TypeScript: 492.5KB
Created: 1/10/2025
Updated: 1/20/2025