Project Haku is an AI-powered Japanese learning assistant that helps users practice and learn Japanese through interactive conversations. Built with Next.js 13, Supabase, and modern web technologies.
[This project is broken, which is why I've decided to open source if anyone want to contribute through it]
- 🤖 AI-powered Japanese learning assistant
- 💬 Real-time chat interface
- 🔄 Multiple input modes (Normal, Hiragana, Katakana)
- 👤 User authentication with NextAuth.js
- 📊 Usage tracking and subscription tiers
- 🎨 Beautiful UI with Tailwind CSS and shadcn/ui
- 🌙 Dark mode support
- Node.js 18+ and npm/yarn
- Supabase account
- Gemini AI API key
- Clone the repository:
git clone https://github.com/dazadev/project-haku.git
cd project-haku- Install dependencies:
npm install
# or
yarn install- Set up environment variables:
Create a
.env.localfile in the root directory with the following variables:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# NextAuth.js
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret
# OAuth Providers (if using)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
# OpenAI (if using)
OPENAI_API_KEY=your_openai_api_key- Set up the Supabase database:
- Create a new Supabase project
- Run the migrations in the
supabase/migrationsfolder in order:create_chats.sqlcreate_messages.sqlcreate_tracking_chat.sql20240101_update_chat_policies.sql20240101_update_users_policies.sql
- Run the development server:
npm run dev
# or
yarn dev- Open http://localhost:3000 in your browser.
project-haku/
├── app/ # Next.js 13 app directory
│ ├── api/ # API routes
│ ├── chat/ # Chat pages
│ └── page.tsx # Home page
├── components/ # React components
├── hooks/ # Custom React hooks
├── lib/ # Utility functions and configurations
├── public/ # Static assets
├── styles/ # Global styles
├── supabase/ # Supabase configurations and migrations
└── types/ # TypeScript type definitions
- Uses NextAuth.js for authentication
- Supports multiple OAuth providers
- Integrates with Supabase for user management
- Real-time message updates
- Support for different input modes
- Message history persistence
- Usage tracking and limits
chatstable for conversation managementmessagestable for storing chat messages- Row Level Security (RLS) for data protection
- Usage tracking system
- Create a production Supabase instance
- Set up environment variables in your deployment platform
- Deploy using the Vercel platform or your preferred hosting service
- Fork the repository
- Create a new branch:
git checkout -b feature/your-feature - Make your changes and commit:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature/your-feature - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue in the GitHub repository or contact the maintainers.
- Next.js team for the amazing framework
- Supabase team for the backend infrastructure
- shadcn/ui for the beautiful components
- All contributors and users of Project Haku