A Next.js web application for managing device subscriptions and connected vehicles through the DIMO ecosystem. At this time, this application enables users to view their connected vehicles, activate/cancel device subscriptions, and manage payment methods.
- DIMO Authentication: Integrated with Login With DIMO for seamless user authentication
- Vehicle Dashboard: Display connected vehicles from user's DIMO account
- Device Subscription Management:
- Activate subscriptions for R1 devices
- Cancel active subscriptions
- Real-time subscription status checking
- Payment Method Management:
- View saved payment methods
- Set default payment methods
- Remove payment methods
- Stripe Integration: Secure payment processing with subscription management
- Multi-language Support: Internationalization with English and French (uses Crowdin)
- Responsive Design: Mobile-friendly interface built with Tailwind CSS
- Wallet Management: Manage cryptocurrency wallets
- Token Operations: Send and receive tokens
- Passkey Management: Secure authentication with passkeys
- Vehicle Minting: Mint vehicles as NFTs
- Extended Device Support: Support for additional DIMO-compatible devices
- Framework: Next.js 15.3 with App Router
- Frontend: React 19, Tailwind CSS 4, TypeScript
- Authentication: DIMO Login SDK + Clerk (fallback)
- Payments: Stripe with subscription management
- Database: PostgreSQL with DrizzleORM
- Internationalization: next-intl
- Development: ESLint, TypeScript, Vitest
- Node.js 20+ and npm
- PostgreSQL database (or use local SQLite for development)
- Stripe account for payment processing
- DIMO developer account and API credentials
git clone https://github.com/DIMO-Network/account-manager.git
cd account-manager
npm install
Create a .env.local file in the root directory with the following variables:
# DIMO Configuration
NEXT_PUBLIC_DIMO_CLIENT_ID=your_dimo_client_id
NEXT_PUBLIC_DIMO_REDIRECT_URI=http://localhost:3000/auth/dimo/callback
NEXT_PUBLIC_DIMO_API_KEY=your_dimo_api_key
NEXT_PUBLIC_DIMO_ENV=development
# Clerk Authentication (Fallback)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
# Stripe Configuration
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
# Database
DATABASE_URL=postgresql://postgres:password@localhost:5432/account-manager
# Next.js
NEXT_TELEMETRY_DISABLED=1
# Generate database migrations
npm run db:generate
This will create a migration file that reflects your schema changes. The migration is automatically applied during the next database interaction, so there is no need to run it manually or restart the Next.js server.
The project follows the Conventional Commits specification, meaning all commit messages must be formatted accordingly. To help you write commit messages, the project uses Commitizen, an interactive CLI that guides you through the commit process. To use it, run the following command:
npm run commit
One of the benefits of using Conventional Commits is the ability to automatically generate a CHANGELOG
file. It also allows us to automatically determine the next version number based on the types of commits that are included in a release.
The project uses CodeRabbit, an AI-powered code reviewer. CodeRabbit monitors your repository and automatically provides intelligent code reviews on all new pull requests using its powerful AI engine.
Setting up CodeRabbit is simple, visit coderabbit.ai, sign in with your GitHub account, and add your repository from the dashboard. That's it!
All unit tests are located alongside the source code in the same directory, making them easier to find. The project uses Vitest and React Testing Library for unit testing. You can run the tests with the following command:
npm run test
# Run tests with coverage
npm run test -- --coverage
# Type checking
npm run check-types
# Linting
npm run lint
The following features are configured but not currently active. They can be enabled by uncommenting relevant code and adding appropriate environment variables:
# Add to .env.local to enable
NEXT_PUBLIC_SENTRY_DSN=your_sentry_dsn
SENTRY_AUTH_TOKEN=your_sentry_token
# Add to .env.local to enable
ARCJET_KEY=your_arcjet_key
# Add to .env.local to enable
LOGTAIL_SOURCE_TOKEN=your_logtail_token
# Add to .env.local to enable
NEXT_PUBLIC_POSTHOG_KEY=your_posthog_key
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
Update `.env.production with your production values:
NEXT_PUBLIC_APP_URL=https://your-domain.com
DATABASE_URL=your_production_database_url
# ... other production environment variables
npm run build
npm start
The application is configured to work with various hosting platforms including Railway, Sevalla, Vercel, and traditional hosting providers.
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature/new-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built on Next.js Boilerplate by @ixartz
- Powered by DIMO for connected vehicle data
- Payment processing by Stripe
Note: This application is in active development. The roadmap includes evolution into a comprehensive DINC Account Manager with expanded wallet and token management capabilities.