A modern web application for creating, visualizing, and managing family trees with collaborative features.
- Frontend: Next.js 14, React, TypeScript, Tailwind CSS
- Backend: Next.js API Routes, Prisma ORM
- Database: PostgreSQL
- Authentication: NextAuth.js
- Visualization: React Flow
- Node.js 18+
- PostgreSQL
- Git
- Clone the repository:
git clone https://github.com/yourusername/family-heritage-platform.git
cd family-heritage-platform- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env.local
# Edit .env.local with your database credentials- Set up the database:
npx prisma migrate dev
npm run db:seed- Start the development server:
npm run devVisit http://localhost:3000 to see the application.
src/
├── app/ # Next.js 13+ app directory
│ ├── api/ # API routes
│ ├── auth/ # Authentication pages
│ ├── dashboard/ # Dashboard pages
│ └── layout.tsx # Root layout
├── components/ # React components
│ ├── auth/ # Authentication components
│ ├── family-tree/ # Family tree components (Week 2)
│ └── ui/ # Reusable UI components
├── lib/ # Utility libraries
│ ├── auth.ts # NextAuth configuration
│ ├── db.ts # Database client
│ └── services/ # Business logic services
├── types/ # TypeScript type definitions
└── hooks/ # Custom React hooks
- User: Application users with authentication
- Person: Family members with biographical information
- Relationship: Parent-child, Married relationships between people
- User authentication and authorization
- Person management (CRUD operations)
- Relationship tracking
- Biographical information storage
- Photo upload support
POST /api/auth/register- User registrationPOST /api/auth/signin- User sign in (NextAuth)
GET /api/persons- Get user's family membersPOST /api/persons- Create new family memberGET /api/persons/[id]- Get specific person detailsPUT /api/persons/[id]- Update person informationDELETE /api/persons/[id]- Delete person
PUT /api/relationships- Update person relationshipPOST /api/relationships- Create parent-child relationshipDELETE /api/relationships- Remove relationship
# Development
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
# Database
npx prisma studio # Open database GUI
npx prisma migrate dev # Create and apply migrations
npm run db:seed # Seed database with test data
npm run db:reset # Reset database and re-seed
# Code Quality
npm run lint # Run ESLint
npm run type-check # Run TypeScript compiler check