A comprehensive Next.js application for managing Echo applications, API keys, and LLM usage analytics with integrated Stripe payment processing.
- Echo Apps Dashboard - View all your Echo applications with usage statistics
- App Details Page - Detailed view of individual Echo apps with:
- Usage analytics by model
- API key management
- Recent transaction history
- Direct Stripe payment integration
- Balance Management - Real-time balance tracking with credit/debit functionality
- Payment Integration - Mock Stripe payment links for adding credits
- Authentication
- API Key Management - Create and manage API keys for users
- Stripe Integration - Payment links and webhook handling (mocked)
- Balance Operations - Increment/decrement user balances
- Usage Analytics - Track LLM transactions and costs
- Users - User accounts with Auth.js integration support
- Echo Apps - Individual Echo applications
- API Keys - API keys associated with users and apps
- Payments - Payment records with Stripe integration
- LLM Transactions - Detailed transaction logs with token usage and costs
- Framework: Next.js 15 with App Router
- Database: PostgreSQL with Prisma ORM
- Styling: Tailwind CSS
- Icons: Lucide React
- Authentication: Auth.js
- Payments: Stripe (mocked)
- TypeScript: Full type safety
- Node.js 18+
- PostgreSQL database
- pnpm
-
Clone and navigate to the project:
cd echo-control -
Install dependencies:
pnpm install
-
Create .env file:
# Generate .env file pnpm local-setup -
Run database migrations:
npx prisma generate npx prisma db push
-
Start the development server:
pnpm run dev
-
Open the application: Visit http://localhost:3000
- View all Echo applications
- Quick balance overview
- Create new applications
- Generate payment links
- Comprehensive usage analytics
- API key management
- Transaction history
- Model-specific usage breakdown
- Direct Stripe integration
- Real-time balance calculation
- Payment history
- Admin controls for balance adjustments
- Stripe payment integration
pnpm testTo run scripts, you should do:
SKIP_ENV_VALIDATION=1 ./scripts/<name-of-script.sh># Reset database
npx prisma db push --force-reset
# View database
npx prisma studio
# Generate client after schema changes
npx prisma generatepnpm run build
pnpm start- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.