Design Pattern

The project follows the principles defined in .cursorrules: KISS, YAGNI, DRY, and SOLID (Single Responsibility, Open/Closed). UI is built with ShadcnUI and Tailwind; forms are validated with Zod before submission.

Validation

All form inputs are validated with Zod schemas. Validation runs on the client (e.g. via zodResolver with React Hook Form) and can be mirrored on the server or backend. See the Login and Social Posts sections for examples (login schema, create-post schema).

Layers and Imports

Features do not import from other features. Shared and core modules are used for cross-cutting concerns. Components in @/components/ui are modified directly when needed; Tailwind-first styling is preferred.

State and Loading

Lists handle empty and error states; loading is represented with skeletons or spinners. Critical areas (e.g. auth, dashboard) can be wrapped with error boundaries.