現場の「よし!」を、最強の安全装置に変える
A next-generation industrial safety management system that digitizes Japan's "指差呼称" (pointing and calling) safety practice using multimodal AI.
Built with the T3 Stack using Bun runtime.
-
Install dependencies:
make install # or: bun install -
Configure environment:
cp .env.example .env # Edit .env with your credentials -
Run with Docker (Recommended):
# Development mode with hot reload make docker-dev-build make docker-dev-up # View logs make docker-dev-logs # Stop containers make docker-dev-down
-
Or run locally:
# Start PostgreSQL first (or use Docker) make db-init # Initialize database make dev # Start dev server on port 6666
-
Access the application:
- App: http://localhost:6666
- Database (debug): localhost:6670
Run make help to see all available commands. Key commands:
Development:
make dev- Start development servermake build- Build for productionmake test- Run testsmake typecheck- Type checking
Docker Development:
make docker-dev-build- Build dev containersmake docker-dev-up- Start dev containers (hot reload)make docker-dev-down- Stop dev containersmake docker-dev-logs- View container logs
Docker Production:
make docker-build- Build production containersmake docker-up- Start production containersmake docker-down- Stop production containers
Database:
make db-init- Initialize databasemake db-push- Push schema changesmake db-migrate- Create migrationsmake db-studio- Open Prisma Studio
Code Quality:
make lint- Run ESLintmake format- Format with Prettiermake check- Run all checks
The project uses Husky and lint-staged for pre-commit hooks. Hooks are automatically installed during make install. They will:
- Run ESLint and Prettier on staged files
- Run TypeScript type checking
- Block commits with type errors or lint errors
To manually install hooks:
make hooks-installThe application is deployed at https://yoshitomo.rxx.jp via Cloudflare Tunnel.
-
Build and start production containers:
make docker-build make docker-up
-
Configure Cloudflare Tunnel to route yoshitomo.rxx.jp → localhost:6666
-
Environment variables: Ensure
.envhas production values:NEXTAUTH_URL=https://yoshitomo.rxx.jp DATABASE_URL=postgresql://postgres:password@db:5432/yoshi # Add OAuth credentials, API keys, etc.
Add both development and production callback URLs to OAuth providers:
Google OAuth Console:
- Authorized redirect URIs:
http://localhost:6666/api/auth/callback/googlehttps://yoshitomo.rxx.jp/api/auth/callback/google
Discord Developer Portal:
- Redirect URIs:
http://localhost:6666/api/auth/callback/discordhttps://yoshitomo.rxx.jp/api/auth/callback/discord
- Runtime: Bun (JavaScript/TypeScript)
- Framework: Next.js 15 (App Router, Turbopack)
- Database: PostgreSQL 17 + Prisma ORM
- Authentication: NextAuth.js v5 (Google, Discord, Credentials)
- API: tRPC
- Styling: Tailwind CSS + shadcn/ui
- AI/ML:
- SambaNova API (Llama-4-Maverick, Whisper-Large-v3)
- Hume AI (Empathic TTS with Fumiko voice)
Docker containers won't start:
- Check if ports 6666 and 6670 are available
- Run
make docker-dev-logsto see error messages - Ensure
.envfile exists and is properly configured
Database connection issues:
- Verify PostgreSQL is running:
docker ps - Check DATABASE_URL in
.env - Try
make db-resetto reset database
OAuth errors:
- Verify callback URLs match exactly in provider consoles
- Check NEXTAUTH_URL matches your deployment URL
- Ensure NEXTAUTH_SECRET is set (generate with
openssl rand -base64 32)
Hot reload not working:
- Ensure using development setup:
make docker-dev-up - Check volume mounts in docker-compose.dev.yml
- Try
make docker-dev-restart
We try to keep this project as simple as possible, so you can start with just the scaffolding we set up for you, and add additional things later when they become necessary.
If you are not familiar with the different technologies used in this project, please refer to the respective docs. If you still are in the wind, please join our Discord and ask for help.
To learn more about the T3 Stack, take a look at the following resources:
- Documentation
- Learn the T3 Stack — Check out these awesome tutorials
You can check out the create-t3-app GitHub repository — your feedback and contributions are welcome!
Follow our deployment guides for Vercel, Netlify and Docker for more information.