A Next.js application for IOTA gas station management.
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Package Manager: Bun
- Build Tool: Turbopack
- Styling: Tailwind CSS v4
- UI Components: Radix UI primitives
- Component Library: shadcn/ui style components
- Icons: Lucide React
- Theming: next-themes
- GraphQL Client: Apollo Client v4
- GraphQL Codegen: gql.tada (type-safe GraphQL)
- Subscriptions: graphql-ws (WebSocket)
- State Management: React Context API
- Form Library: @tanstack/react-form
- Validation: Zod
- Charts: Recharts
- Tables: @tanstack/react-table
- Notifications: Sonner (toast notifications)
- Class Utilities: clsx, tailwind-merge
- Variance: class-variance-authority
- Linting: ESLint with flat config
- Formatting: Prettier
- Type Checking: TypeScript strict mode
- Bun installed on your system
- Clone the repository
- Install dependencies:
bun install
Start the development server:
bun devThis command automatically generates GraphQL types using gql.tada before starting the dev server.
Open http://localhost:3000 to view the application.
Note: If you make changes to GraphQL queries, mutations, or fragments, the types will be automatically regenerated. You can also manually regenerate types with:
bun generate-typesBuild the application for production:
bun run buildRun ESLint to check code quality:
bun lintFix auto-fixable issues:
bun lint --fixsrc/
├── app/ # Next.js App Router pages
│ ├── ApolloWrapper.tsx # Apollo Client provider
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Dashboard page
│ └── group/[id]/ # Group detail page
├── components/ # React components
│ ├── ui/ # shadcn/ui components
│ ├── Chart/ # Chart components
│ ├── ClientTable/ # Client table component
│ ├── BudgetBar/ # Budget bar components
│ └── Sidebar/ # Sidebar components
├── contexts/ # React Context providers
│ ├── CurrencyContext.tsx
│ └── ExchangeRateContext.tsx
├── hooks/ # Custom React hooks
├── lib/
│ ├── api/ # GraphQL API layer
│ │ ├── queries/ # GraphQL queries
│ │ ├── mutations/ # GraphQL mutations
│ │ ├── subscriptions/ # GraphQL subscriptions
│ │ └── fragments/ # GraphQL fragments
│ └── utils/ # Utility functions
└── types/ # TypeScript type definitions
- Follow the ESLint rules defined in
eslint.config.mjs - Use Prettier for code formatting
- Ensure all code passes linting before committing