This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Based on package.json:
- Development Server:
npm run dev(runsnext dev) - Production Build:
npm run build(runsnext build) - Start Production Server:
npm run start(runsnext start) - Linting:
npm run lint(runsnext lint) - Testing:
npm run test(runsjest)- To run a single test file:
npm test -- <path_to_test_file.test.ts> - To run tests in watch mode:
npm test -- --watch
- To run a single test file:
This project, AmpShare, is a Next.js application built with TypeScript.
Core Features (from docs/blueprint.md):
- User Authentication: Simple system for four users across two apartments. The primary authentication logic is in
src/lib/auth.ts, utilizingbcryptjsfor password hashing anduuidfor user IDs. User and SeedUser types are defined insrc/types.ts. A placeholder database connection module exists atsrc/lib/db.ts. - Scheduling Interface: A weekly scheduling UI per appliance, per apartment.
- Combined Schedule Display: Color-coded view for both apartments.
- Conflict Detection & Resolution: AI-powered conflict detection with recommendations and manual override.
- Real-time Alerts: Notifications for appliance use and potential overloads.
- User Management: Admin UI for onboarding.
Project Structure Overview:
src/: Contains the main application code.src/app/: Likely uses Next.js App Router (e.g.,src/app/layout.tsxexists).src/lib/: Contains core library/utility code.auth.ts: Handles user authentication logic (finding users, updating passwords).db.ts: Placeholder for database interaction. Currently returns a mock DB object for build/test purposes.
src/types.ts: Defines shared TypeScript types likeUserandSeedUser.
docs/: Contains project documentation, includingblueprint.mdwhich outlines features and style guidelines.- Testing: Uses Jest and React Testing Library. Configuration is in
jest.config.jsandjest.setup.js. Test files are expected to be co-located with the code they test or in__tests__directories, using a.test.tsor.test.tsxextension.
Style Guidelines (from docs/blueprint.md):
- Primary color: Muted blue (#5D9CEC)
- Background color: Light gray (#F0F4F8)
- Accent color: Warm orange (#F2A63A)
- Font: 'Inter' sans-serif
- Icons: Clear, minimalist for appliances.
- Layout: Clean, grid-based.
- UI: Subtle transitions and animations.