AI GUIDE to Kangalos Frontend
Welcome to the Kangalos Frontend Codebase! This file is designed to help AI agents understand, navigate, and contribute to this project efficiently and in line with our standards.
AI GUIDE to Kangalos Frontend
Welcome to the Kangalos Frontend Codebase! This file is designed to help AI agents understand, navigate, and contribute to this project efficiently and in line with our standards.
Project Overview
Kangalos is a modern, full-featured project management platform built with Next.js (App Router, TypeScript), React 19, and Tailwind CSS. It serves as a unified hub for managing research projects, student theses, community innovations, and externally funded initiatives at the University of Rwanda and its partner institutions.
Key Technologies
- Next.js 15+ (App Router, SSR, API routes)
- TypeScript (strict mode)
- React 19 (functional components, hooks)
- Tailwind CSS (utility-first styling)
- Radix UI (accessible UI primitives)
- Zod (schema validation)
- React Hook Form (forms)
- next-intl (i18n, translations)
- TanStack React Query (data fetching and caching)
Folder Structure
/src/app– Next.js app directory (routing, layouts, pages)/src/components– Reusable UI components (atomic design)/src/features– Domain-driven feature modules (auth, users, reports, projects etc.)/src/messages– Translation files (JSON, one per locale)/src/i18n– Internationalization logic (routing, helpers)/public– Static assets (images, favicons)
Internationalization
- Uses
next-intlfor translations and locale routing. - Supported locales:
en,fr,ko(see/src/messages). - All user-facing text must be translatable using the translation system.
Coding Conventions
- All code must be written in TypeScript.
- Use functional React components and hooks.
- Follow the existing code style (see
.eslintrc, Prettier if present). - Use Tailwind CSS for all styling; avoid custom CSS unless necessary.
- Name files and components using PascalCase for components, kebab-case for folders.
- Add JSDoc comments for complex logic and exported functions.
Features Folder
- Each domain (e.g., auth, users, reports) has its own folder in
/src/features. - Feature folders contain components, hooks, services, schemas, and types related to that domain.
Translations
- All strings must be placed in the appropriate JSON file in
/src/messages. - Use the
useTranslationshook fromnext-intlin components. - use the file at src\app[locale]\test\page.tsx as an example to see how translations was made
Testing & Verification
- Always run
npm run lintand thennpm run buildafter each task to verify code quality and build integrity. - If tests are present, run
npm testbefore submitting code.
Pull Request Guidelines
When creating a PR (or when you change features locally):
- if they are related to one feature maintain a markdown file in the pr directory
- Include a clear, descriptive title and summary of changes.
- Reference any related issues.
- Ensure all code passes lint and build checks.
- Add screenshots for UI changes.
- Keep PRs focused on a single concern or feature.
- Ensure all user-facing text is translatable.
Best Practices for AI
- Analyze the
/src/featuresand/src/messagesfolders for context before generating code. - Use existing patterns for API calls, error handling, and state management.
- Prefer composition over inheritance in React components.
- Keep components small and focused; split logic into hooks/services as needed.
- Use Zod for schema validation and React Hook Form for forms.
- Document any new utilities or helpers.
Implementing components and adding them to pages
- use the file located in tasks\ui-components-tasks.md to implement all tasks
- after implementing a task please mark it as completes in that file and how you did it please
Example: Adding a New Feature
- Create a new folder in
/src/features(e.g.,/src/features/projects). - Add components, hooks, and services as needed.
- Add translation keys to all
/src/messages/*.jsonfiles. - Use the translation system for all UI text.
- Run
npm run lintandnpm run buildto verify.
Example: Adding a Translation
- Add the new key to all locale files in
/src/messages. - Use the
useTranslationshook to access the key in your component.
Additional Notes
- Do not modify files in
/publicdirectly except for static assets. - Do not hardcode any user-facing text; always use translations.
- Use environment variables for secrets and API endpoints.
Related Documents
System Prompt
You are Kiro, an AI assistant and IDE built to assist developers.
GitHub Copilot Instructions
- Follow Laravel best practices (service classes, form requests, named routes, tests in Pest).
Business Intelligence Dashboard - Comprehensive GitHub Copilot Instructions
**ALWAYS follow these instructions first and fallback to additional search and context gathering only if the information in these instructions is incomplete or found to be in error.**
Slidev - LLM 向け統合ドキュメント
このドキュメントは、LLM(大規模言語モデル)がSlidevについて理解しやすいよう、公式ドキュメントの内容を1つのファイルにまとめたものです。