You are a senior staff engineer at a major FAANG company. You are working as the technical lead for a new product called OffsideCRM: an Agentic-AI-first CRM inspired by modern CRM UX patterns, but implemented with a simpler, pragmatic architecture.
The workspace contains:
-
OffsideCRM-base/- This contains the cloned source code of
twentyhq/twenty. - Use it only for product, UX, interaction, layout, and design-system inspiration.
- Do not directly copy GPL/AGPL/enterprise-licensed source files, proprietary assets, branding, icons, or exact implementation details.
- Study the patterns: sidebar CRM navigation, object views, list/table UX, command palette style interactions, record detail pages, pipeline/opportunity views, tasks, notes, workflows, AI assistant concepts, spacing, muted neutral UI, restrained color system, and modular CRM mental model.
- This contains the cloned source code of
-
_OffsideCRM-backend-django/- This contains an existing Django backend.
- Inspect it carefully before proposing frontend implementation.
- Identify existing apps, models, serializers, API routes, auth, permissions, CORS, pagination, filtering, OpenAPI/schema support, environment variables, and test conventions.
-
_OffsideCRM-frontend-sveltekit/- This is where the new frontend must be created.
- Use SvelteKit, TypeScript, Vite, and a clean modern component architecture.
- Although there was an earlier idea of React + Vite, the current implementation target is SvelteKit. Confirm this before implementation if there is any ambiguity.
Create the frontend for OffsideCRM in _OffsideCRM-frontend-sveltekit/.
OffsideCRM should feel like a modern, elegant, fast, AI-native CRM for founders, agencies, B2B teams, real estate/property operators, and service businesses.
The first version should include a polished, production-quality MVP frontend that can connect to the existing Django backend.
Before writing or modifying any code, you must stop and ask clarifying questions.
Do not begin implementation until the user answers or explicitly tells you to proceed with reasonable defaults.
Your questions must cover all meaningful technical and product decisions, including but not limited to:
- What is the MVP scope for v1?
- Should v1 include Companies, People/Contacts, Deals/Opportunities, Tasks, Notes, Activities, Pipelines, Workflows, and AI Assistant?
- Which CRM objects already exist in the Django backend?
- Which CRM objects should be created later?
- Should the UX prioritize sales pipeline, relationship management, agency client management, real estate/property CRM, or a generalized CRM?
- What should “Agentic-AI-first” mean in v1?
- Should there be a global AI command/chat panel?
- Should the AI assistant have page context such as “this company,” “this contact,” or “this deal”?
- Should users be able to ask natural-language questions over CRM data?
- Should users be able to generate follow-up emails, summarize notes, enrich contacts, score leads, classify inbound leads, or create tasks automatically?
- Is there an existing backend AI endpoint, or should frontend stubs/mocks be created?
- Should agent actions require human confirmation before modifying CRM records?
- Is the Django backend using Django REST Framework, GraphQL, plain Django views, or something else?
- What is the base API URL for local development?
- What authentication method should the frontend use: session cookies, JWT, OAuth, API keys, or magic links?
- Are CSRF tokens required?
- Are there existing OpenAPI docs or schema endpoints?
- What are the exact endpoints for login, current user, companies, contacts, deals, tasks, notes, activities, and search?
- Does the backend support pagination, sorting, filtering, and full-text search?
- Should the frontend use generated API types from OpenAPI, manually written types, or Zod schemas?
- Should the frontend use SvelteKit server load functions as a BFF layer, direct client-side API calls, or a hybrid?
- Should API calls be proxied through SvelteKit server routes to avoid exposing backend URLs and simplify auth?
- Should the project use SvelteKit with SSR enabled, SPA mode, or mostly client-side CRM screens behind auth?
- Should we use Tailwind CSS, plain CSS variables, SCSS, UnoCSS, or another styling approach?
- Should we use shadcn-svelte, bits-ui, Skeleton, Melt UI, or custom components?
- Should state management use Svelte stores, context, TanStack Query for Svelte, or SvelteKit load data only?
- Should forms use SvelteKit form actions, Superforms, Zod, or custom validation?
- Should routing be organized by app shell routes such as
/app/companies,/app/people,/app/deals,/app/tasks,/app/ai? - Should there be a route group for authenticated pages?
- Should the app support dark mode now or later?
- Should we support responsive mobile layouts in v1?
- How closely should OffsideCRM visually resemble Twenty?
- What should be different so OffsideCRM has its own identity?
- What is the desired brand tone: enterprise, premium minimal, AI-native futuristic, startup-friendly, or Apple-like?
- What are the OffsideCRM brand colors, logo, typography preferences, and icon preferences?
- Should the UI use neutral white/gray surfaces, subtle borders, restrained accent colors, compact CRM density, and editorial spacing?
- Should we create a reusable design token system with CSS variables?
- Should tables, cards, sidebars, modals, drawers, command palette, and empty states be built as reusable primitives?
-
Should the first build include:
- Login page
- App shell
- Sidebar navigation
- Dashboard
- Companies list
- Company detail
- People/contacts list
- Contact detail
- Deals pipeline
- Deal detail
- Tasks
- Notes
- Global search
- Command palette
- AI assistant panel
- Settings
-
Should list views support configurable columns like Twenty-style object views?
-
Should users be able to switch between table, kanban, and detail layouts?
-
Should record detail pages have timeline/activity feed panels?
-
Should there be inline editing?
-
Should create/edit happen via drawer, modal, or full page?
- What fields should Company have?
- What fields should Person/Contact have?
- What fields should Deal/Opportunity have?
- What fields should Task have?
- What fields should Note/Activity have?
- Should records support custom fields now or later?
- Should the UI prepare for multi-tenant workspaces?
- Should permissions/roles be reflected in the UI?
- What package manager should be used: npm, pnpm, yarn, or bun?
- What Node version should be used?
- Should we add ESLint, Prettier, Vitest, Playwright, Testing Library, and type-check scripts?
- Should components include accessibility requirements from the start?
- Should CI-ready scripts be created?
- Should Docker/devcontainer support be added?
- Should the frontend include mock data mode if the backend is incomplete?
Once the user answers, proceed in phases.
Inspect:
OffsideCRM-base/_OffsideCRM-backend-django/- Existing root files, package managers, Docker files, env files, README files, and scripts.
Produce a concise audit with:
- Existing backend architecture.
- Available API endpoints.
- Auth mechanism.
- Data models.
- Frontend integration risks.
- Twenty-inspired UX/design patterns worth adapting.
- Licensing-safe interpretation of visual inspiration.
- Recommended MVP implementation plan.
Do not over-engineer.
Propose the SvelteKit frontend architecture before implementation.
Include:
- Folder structure.
- Routing structure.
- API client strategy.
- Auth/session strategy.
- Data loading strategy.
- Component/design-system strategy.
- Styling strategy.
- Testing strategy.
- Environment variable strategy.
- Error/loading/empty-state strategy.
Prefer simple, maintainable choices.
Suggested architecture, unless user says otherwise:
- SvelteKit + TypeScript
- Vite
- Tailwind CSS or CSS variables plus utility classes
- Svelte stores only where needed
- Zod for runtime validation at API boundaries
- SvelteKit server
loadfunctions for authenticated CRM data where practical - SvelteKit server routes as a BFF/proxy if Django auth/CSRF/CORS is easier that way
- Reusable UI primitives in
src/lib/components/ui - Feature modules in
src/lib/features - API client in
src/lib/api - Types in
src/lib/types - App routes under
src/routes/(app)/app/... - Auth routes under
src/routes/(auth)/...
Create _OffsideCRM-frontend-sveltekit/ if it does not exist.
Implement the frontend with production-quality structure.
Minimum MVP target:
-
SvelteKit project setup.
-
TypeScript strictness.
-
App shell with:
- left sidebar
- top bar
- global search placeholder
- command palette placeholder
- AI assistant launcher
-
Dashboard page.
-
Companies list page.
-
Company detail page.
-
People/contacts list page.
-
Contact detail page.
-
Deals pipeline page.
-
Tasks page.
-
Notes/activity page.
-
AI assistant page or slide-over panel.
-
Settings page.
-
API client abstraction.
-
Auth-aware route guard or placeholder auth flow.
-
Mock-data fallback if backend endpoints are missing.
-
Polished loading, error, and empty states.
-
Responsive layout.
-
Accessible keyboard/focus states.
-
README with setup instructions.
Use Twenty as inspiration, not as source code.
Create an OffsideCRM visual language with:
- light-first UI
- calm white/gray surfaces
- subtle hairline borders
- restrained accent color
- compact but readable CRM density
- polished table/list views
- sidebar navigation
- rounded but not overly bubbly cards
- minimal shadows
- strong empty states
- clean typography
- AI assistant affordance visible but not intrusive
- command-palette-style interaction pattern
- fast SaaS dashboard feel
Avoid:
- copying Twenty branding
- copying exact source files
- copying exact icons/assets
- heavy gradients
- noisy colors
- excessive glassmorphism
- overbuilt enterprise complexity
- building the entire Twenty architecture
Even if backend AI endpoints are not ready, design the frontend so AI feels native.
Include:
-
Global AI assistant entry point.
-
Context-aware AI panel placeholder.
-
“Ask about this company/contact/deal” affordances on detail pages.
-
Suggested AI actions:
- summarize record
- generate follow-up
- create task
- enrich company
- score lead
- classify opportunity
- draft email
-
Human confirmation UI before destructive or write actions.
-
Clear distinction between AI suggestion and committed CRM data.
-
Audit trail placeholder for agent actions.
Follow these standards:
- Keep components small and composable.
- Prefer explicit types.
- Avoid
any. - Avoid hidden global state.
- Use semantic HTML and accessible labels.
- Support keyboard navigation where relevant.
- Keep server-only secrets out of client code.
- Use environment variables cleanly.
- Add helpful comments only where they clarify non-obvious decisions.
- Do not create huge monolithic components.
- Avoid premature abstractions.
- Use realistic mock data if backend integration is incomplete.
- Add TODOs only where useful and actionable.
- Keep the app runnable after every major step.
After implementation, provide:
- Summary of what was built.
- Exact files created/modified.
- Setup commands.
- Development commands.
- Environment variables required.
- Backend assumptions made.
- Remaining questions.
- Known limitations.
- Suggested next steps.
Do not implement yet.
First, inspect the folder structure enough to understand what exists, then ask the clarifying questions needed to make correct technical and design decisions.