Styling: Tailwind CSS with utility-first approach.
Theming: ⚠️ Follow the constellation theming charts by using only the color variables in global css that are present both in :root and :dark sections
Utilities and Services: camelCase (e.g., apiClient.tsx).
Styles: Lowercase with hyphens (e.g., globals.css).
Imports
Use absolute imports when referencing files from app or components.
Example: import Header from '@/components/constellation/Header'.
Icons
Follow this structure for adding new icons:
Place svg files in the appropriate category (fill or outline).
Use descriptive names that reflect the icon's purpose.
You can also use lucide-react in the project
App internationalization
We use i18n to handle multiple languages in the app:
Import useTranslation from "react-i18next" at the start of every file with user faced text
use const { x } = useTranslation(${tranlsation_folder});Â
Translation folder are the following : "blog", "common", "constellation-editor", "dashboard", "header", "landing", "login", "map", "settings", "element". You can add some if you’re designing a whole new feature like "whiteboard" for example, but you need to add it in i18n.js file
wrap every text with x such as ("elementPage.story")
write the text in the different languages folder such as fr and en
Development Workflow
Getting Started
Clone the repository.
Install dependencies:
buninstall
Start the development server:
bundev
Access the application at http://localhost:3000.
Build and Deployment
Build the application:
bunbuild
Deploy using your preferred service (e.g., Vercel, Netlify).
Testing Guidelines
Use React Testing Library and Jest for component testing.
Ensure all components are tested in isolation.
Naming Convention: Test files should be named ComponentName.test.tsx.
Run the linter and a build before each push (you can use the constellation’s pre-push hooks)
Adding New Features
Place feature-specific pages in the feature/ directory.
Add reusable components to the components/ folder.
Follow the existing conventions for structure and naming.
Contributions
Branching Strategy: Use feature/{feature-name} for new features, use {nb_issue} + {issue description} for issue related branched