A vehicle inventory management system for junkyards. Track different vehicle types (sedans, coupes, mini-vans, motorcycles) with automatic registration and a clean dashboard interface.
This app helps junkyards keep track of their vehicle inventory. You can:
- Add vehicles with type-specific details (wheels, doors, engine status, etc.)
- Automatically register each vehicle with a unique ID
- View and filter your inventory
- See mileage ratings at a glance
Built with modern web technologies:
- Next.js - React framework for the frontend and API routes
- React - UI components
- TypeScript - Type-safe JavaScript
- NextAuth.js - Handles user authentication
- Node.js 18 or higher
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser to http://localhost:3000
├── __tests__/ # Test files for core features
├── components/ # Reusable React components (forms, lists, etc.)
├── pages/ # Next.js pages and API endpoints
├── styles/ # Global CSS styles
├── types/ # TypeScript type definitions
└── utils/ # Helper functions (mileage calculations, etc.)
The project includes comprehensive tests for core features:
- Utility Functions: Mileage calculations, type guards, vehicle factory, storage service
- API Routes: Registration endpoint, subscription endpoint with rate limiting
- Test Coverage: 40+ tests covering critical business logic
Run tests with:
npm testTest files are located in __tests__/ and follow Jest + React Testing Library best practices.
npm run dev- Start the development server (with hot reload)npm run build- Create a production buildnpm start- Run the production build locallynpm test- Run test suitenpm test:watch- Run tests in watch modenpm test:coverage- Generate test coverage report
Optional - App works without env vars. Defaults:
- Auth:
admin/password123 - Newsletter: Dev mode (logs to console)
For Production (Vercel):
NEXTAUTH_SECRET=your-secret-key-here
RESEND_API_KEY=re_your_api_key_here # Get from resend.com
RESEND_FROM_EMAIL=noreply@yourdomain.com
NEXT_PUBLIC_SITE_URL=https://your-app.vercel.app