{"id":29551197,"url":"https://github.com/trevor-trinh/axum-react","last_synced_at":"2025-12-30T22:07:10.715Z","repository":{"id":303320649,"uuid":"1010336635","full_name":"trevor-trinh/axum-react","owner":"trevor-trinh","description":"Modern fullstack template with Rust + Axum backend, React + Vite frontend, and end-to-end type safety in a Turborepo monorepo. | All the buzzwords","archived":false,"fork":false,"pushed_at":"2025-07-07T01:14:27.000Z","size":128,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-07T02:28:16.822Z","etag":null,"topics":["axum","bun","openapi","react","tanstack","turborepo","vite"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trevor-trinh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-28T21:18:05.000Z","updated_at":"2025-07-07T01:15:14.000Z","dependencies_parsed_at":"2025-07-07T02:38:36.285Z","dependency_job_id":null,"html_url":"https://github.com/trevor-trinh/axum-react","commit_stats":null,"previous_names":["trevor-trinh/axum-react"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/trevor-trinh/axum-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trevor-trinh%2Faxum-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trevor-trinh%2Faxum-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trevor-trinh%2Faxum-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trevor-trinh%2Faxum-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trevor-trinh","download_url":"https://codeload.github.com/trevor-trinh/axum-react/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trevor-trinh%2Faxum-react/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265697906,"owners_count":23813099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axum","bun","openapi","react","tanstack","turborepo","vite"],"created_at":"2025-07-18T04:01:54.427Z","updated_at":"2025-12-30T22:07:10.705Z","avatar_url":"https://github.com/trevor-trinh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Axum-React Turborepo Template\n\nA modern fullstack application template built with Turborepo, featuring React frontend with TanStack Start (SSR) and Rust backend with Axum.\n\n## Project Structure\n\n```\napps/\n├── frontend/          # React + TanStack Start (SSR) frontend\n├── backend/           # Axum Rust API\n\npackages/\n└── api-types/         # Shared TypeScript types\n```\n\n## 🚀 Getting Started\n\n```bash\ngit clone git@github.com:trevor-trinh/axum-react.git\ncd axum-react\n\nbun install\nbun run backend:build\n\nbun run dev\n```\n\n**Customize for your project:**\n\n1. Update `package.json` files with your project details\n2. Build your API endpoints in `apps/backend/src/routes/`\n3. Create your UI in `apps/frontend/src/`\n4. Add shared types and run `bun run generate:types`\n\n## 🏗️ Architecture\n\n| Layer        | Technology                        | Purpose                                     |\n| ------------ | --------------------------------- | ------------------------------------------- |\n| **Frontend** | React 18 + TanStack Start (SSR)  | Modern, fast UI with server-side rendering |\n| **Backend**  | Rust + Axum + Serde               | High-performance API with type safety       |\n| **Types**    | OpenAPI → TypeScript              | Automatic type sharing across stack         |\n| **Build**    | Turborepo + Bun                   | Efficient monorepo with intelligent caching |\n\n## Improvements\n\n- [ ] ssr\n\n## Prerequisites\n\n### Frontend\n\n```bash\n# Install Node.js (via nvm - recommended)\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash\nsource ~/.bashrc\nnvm install --lts\nnvm use --lts\n\n# Install Bun\ncurl -fsSL https://bun.sh/install | bash\n```\n\n### Backend\n\n```bash\n# Install Rust\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\nsource ~/.cargo/env\n\n# Install cargo-watch for hot reloading\ncargo install cargo-watch\n```\n\n## Quick Start\n\n```bash\n# Clone the template\ngit clone git@github.com:trevor-trinh/axum-react.git\ncd axum-react\nbun install\n\n# Build backend (required first time)\nbun run backend:build\n\n# Start development\nbun run dev\n```\n\nAccess the app at:\n\n- Frontend (SSR): `http://localhost:3000`\n- Backend API: `http://localhost:3001`\n- Swagger UI: `http://localhost:3001/api/docs`\n\n## Development Commands\n\n```bash\n# Development\nbun run dev                    # Start all services\nbun run frontend:dev          # Frontend only\nbun run backend:dev           # Backend only\n\n# Building\nbun run build                 # Build all apps\nbun run build --filter=frontend  # Build specific app\n\n# Testing \u0026 Quality\nbun run test                  # Run all tests\nbun run lint                  # Lint code\nbun run format                # Format code\n\n# Type Generation\nbun run generate:types        # Generate TypeScript types from backend\n```\n\n## Type Sharing\n\nTypes are automatically shared between Rust backend and TypeScript frontend:\n\n```\nRust structs → OpenAPI spec → TypeScript types\n```\n\n### Usage:\n\n```typescript\n// Import generated types\nimport type { components } from \"@repo/api-types\";\ntype ApiResponse = components[\"schemas\"][\"ApiResponse\"];\n```\n\n### Adding Types:\n\n1. Define Rust struct with `#[derive(ToSchema)]`\n2. Add to `generate_openapi.rs`\n3. Run `bun run generate:types`\n\n## License\n\nMIT License - feel free to use this template for your projects!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrevor-trinh%2Faxum-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrevor-trinh%2Faxum-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrevor-trinh%2Faxum-react/lists"}