app
animation and heropagecomponents
animation and heropagefeatures
search filter addedhooks
feat: flashcard implimentedlib
feat: flashcard implimentedlocales
feat: flashcard implimentedpublic
favicon fixedtypes
feat: flashcard implimented.gitignore
startingbun.lock
basic UI donecomponents.json
startingDockerfile
updated Readmeeslint.config.mjs
startingnext.config.ts
updated Readmepackage.json
basic UI donepostcss.config.mjs
startingREADME.md
updated Readmetailwindcolors.css
fixed learning pathtsconfig.json
startingBhashaAI Frontend
The modern, bilingual (English & Gujarati) web interface for BhashaAI, built with Next.js 15, Tailwind CSS, and Shadcn UI.
π Architecture
The frontend follows a feature-first architecture, leveraging Next.js App Router and React Server Components.
graph TD
User[User] --> Next[Next.js App Server]
Next --> |Server Components| Pages[App Pages]
Pages --> |Client Components| Components[Interactive UI]
Components --> |React Query| API[API Service Layer]
API --> |Axios| Backend[FastAPI Backend]
subgraph "Client State"
Context[Language Context]
Theme[Theme Provider]
Query[TanStack Query Cache]
end
Components --> Context
Components --> ThemeKey Technologies
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS, Shadcn UI
- State: React Query, Zustand
- Animation: Framer Motion
- Forms: React Hook Form, Zod
π Getting Started
Prerequisites
- Node.js 18+
- bun
- Backend running (for full functionality)
Installation
-
Clone the repository and enter the directory:
cd bhasaai-frontend -
Install dependencies:
npm install # or bun install -
Environment Setup: Copy
.env.exampleto.env.local(create it if missing):# URL of the BhashaAI Backend API NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1 -
Run the development server:
bun run devVisit http://localhost:3000
π³ Docker Setup
You can run the frontend as a standalone container or as part of the full stack.
Build & Run Standalone
docker build -t bhasaai-frontend .
docker run -p 3000:3000 -e NEXT_PUBLIC_API_URL=http://host.docker.internal:8000/api/v1 bhasaai-frontendFull Stack (Recommended)
Run from the project root using Docker Compose:
docker-compose up -dπ Project Structure
src/
βββ app/ # Next.js App Router Pages
β βββ (auth)/ # Authentication Routes
β βββ dashboard/ # Main Teacher Dashboard
β βββ page.tsx # Landing Page
βββ components/
β βββ ui/ # Shadcn UI Primitives
β βββ theme-customizer.tsx # Theme Settings
β βββ ...
βββ lib/
β βββ api.ts # API Client
β βββ i18n.tsx # Internationalization
β βββ ...
βββ hooks/ # Custom React Hooks
βββ locales/ # Translation JSONs (en, gu)π§ͺ Development
- Linting:
bun run lint - Building:
bun run build