A full-stack web application built with Next.js 15, TypeScript, and a local storage-based database.
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS + shadcn/ui
- State Management: Jotai + TanStack Query
- Database: Local Storage (browser-based)
- Forms: React Hook Form + Zod validation
- Icons: Lucide React
- Testing: Vitest + Testing Library
- Node.js 18+
- pnpm (recommended) or npm/yarn
- Clone the repository
- Install dependencies:
pnpm install- Run the development server:
pnpm dev- Open http://localhost:3000 in your browser
├── app/ # Next.js App Router pages
├── components/
│ ├── ui/ # shadcn/ui components
│ ├── forms/ # Form components
│ ├── layout/ # Layout components
│ ├── features/ # Feature-specific components
│ └── common/ # Shared components
├── hooks/ # Custom React hooks
├── lib/
│ ├── db/ # Local storage database
│ ├── utils.ts # Utility functions
│ └── validations.ts # Zod schemas
├── states/ # Jotai atoms
├── types/ # TypeScript types
└── tests/ # Test files
- 🔐 User authentication (mock)
- 📝 Create, read, update, delete posts
- 💬 Comments system
- 📊 Dashboard with statistics
- 🌐 Fully responsive design
- 💾 Persistent data storage in browser
- 🎨 Dark mode support (ready to implement)
This app uses a custom local storage database implementation that provides:
- Repository pattern for data access
- Type-safe models and queries
- Mock data initialization
- Backup and restore functionality
- Users: id, email, name, avatar, createdAt, updatedAt
- Posts: id, title, content, authorId, tags, status, createdAt, updatedAt
- Comments: id, content, postId, authorId, parentId, createdAt, updatedAt
pnpm testpnpm buildpnpm lintMIT# hiko0707