aprs-cli
v1.0.2
Published
CLI tool to create React apps with Next.js or React Router, integrated with Convex and Clerk
Maintainers
Readme
APRS - App React Starter
CLI tool to create React apps with Next.js or React Router, integrated with Convex and Clerk.
Features
- 🚀 Quick project setup with interactive CLI
- ⚛️ Choose between Next.js or React Router
- 🔐 Pre-configured Clerk authentication
- 📦 Integrated Convex backend
- 🎨 Tailwind CSS with shadcn/ui components
- 📝 TypeScript support
- 🔄 Git initialization
- 📦 Automatic dependency installation
Installation
Using npm
npx aprs my-appUsing bun
bunx aprs my-appUsage
Run the CLI command with your project name:
npx aprs my-appFollow the interactive prompts:
- Choose your framework (Next.js or React Router)
- Confirm Git initialization (optional)
Navigate to your new project:
cd my-appSet up your environment variables:
cp .env.example .env.local # for Next.js # or cp .env.example .env # for React RouterInstall dependencies (if not done automatically):
npm install # or bun installStart the development server:
npm run dev # or bun run dev
Setup Required Services
Convex
- Go to Convex Dashboard
- Create a new project
- Copy your deployment URL and deployment ID
- Add them to your environment variables
Clerk
- Go to Clerk Dashboard
- Create a new application
- Configure your JWT template for Convex:
- Go to JWT Templates
- Create or edit the "convex" template
- Copy the Issuer URL
- Add Clerk keys to your environment variables
Project Structure
Next.js
my-app/
├── app/ # Next.js app directory
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/ # React components
│ └── ui/ # shadcn/ui components
├── convex/ # Convex backend
│ └── auth.config.ts # Convex auth configuration
├── lib/ # Utility functions
└── public/ # Static assetsReact Router
my-app/
├── app/ # React Router app directory
│ ├── app.css # Global styles
│ ├── root.tsx # Root layout
│ ├── routes.ts # Route configuration
│ └── routes/ # Route components
├── components/ # React components
│ └── ui/ # shadcn/ui components
├── convex/ # Convex backend
│ └── auth.config.ts # Convex auth configuration
└── public/ # Static assetsEnvironment Variables
Next.js (.env.local)
# Convex
CONVEX_DEPLOYMENT=your_deployment_id
CONVEX_URL=your_convex_url
# Clerk
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_key
CLERK_SECRET_KEY=your_clerk_secret
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/protected
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/protected
# Clerk JWT for Convex
CLERK_JWT_ISSUER_DOMAIN=your_jwt_issuer_domainReact Router (.env)
# Convex
CONVEX_DEPLOYMENT=your_deployment_id
CONVEX_URL=your_convex_url
# Clerk
VITE_CLERK_PUBLISHABLE_KEY=your_clerk_key
CLERK_SECRET_KEY=your_clerk_secret
VITE_CLERK_SIGN_IN_URL=/sign-in
VITE_CLERK_SIGN_UP_URL=/sign-up
VITE_CLERK_AFTER_SIGN_IN_URL=/protected
VITE_CLERK_AFTER_SIGN_UP_URL=/protected
# Clerk JWT for Convex
CLERK_JWT_ISSUER_DOMAIN=your_jwt_issuer_domainAvailable Scripts
Next.js
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run Biome linternpm run format- Format code with Biome
React Router
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run typecheck- Run TypeScript type checking
Learn More
- Next.js Documentation
- React Router Documentation
- Convex Documentation
- Clerk Documentation
- Tailwind CSS
- shadcn/ui
License
MIT
