Skip to content

Latest commit

 

History

History
205 lines (151 loc) · 4.11 KB

File metadata and controls

205 lines (151 loc) · 4.11 KB

LifeQuest Quick Start Guide

Get LifeQuest up and running in 5 minutes! 🚀

Prerequisites

Before you begin, ensure you have:

  • Node.js 18+ installed (Download)
  • PostgreSQL 14+ installed (Download)
  • Git installed (Download)
  • ✅ A code editor (VS Code recommended)

Quick Setup

1. Clone the Repository

git clone https://github.com/yourusername/lifequest.git
cd lifequest

2. Install Dependencies

npm install

This will install dependencies for all workspaces (frontend, backend, mobile, shared).

3. Set Up Environment Variables

cp .env.example .env

Edit .env and update the following:

# Database
DATABASE_URL=postgresql://postgres:password@localhost:5432/lifequest

# JWT Secret (generate a random string)
JWT_SECRET=your-super-secret-key-here

# Firebase (optional for now)
# You can skip Firebase configuration for local development

4. Set Up the Database

# Create database and run migrations
npm run db:setup

# (Optional) Seed with sample data
npm run db:seed

5. Start Development Servers

npm run dev

This starts both frontend and backend servers:

What's Next?

Test the API

# Register a new user
curl -X POST http://localhost:3000/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "test@example.com",
    "password": "SecurePass123!",
    "name": "Test User"
  }'

Access the Web Dashboard

  1. Open http://localhost:3001 in your browser
  2. Register a new account
  3. Start creating goals and tasks!

Mobile App (Optional)

# Start the mobile app
npm run dev:mobile

# For Android
npm run android

# For iOS (macOS only)
npm run ios

Common Commands

# Development
npm run dev              # Start all dev servers
npm run dev:frontend     # Start only frontend
npm run dev:backend      # Start only backend
npm run dev:mobile       # Start mobile app

# Testing
npm test                 # Run all tests
npm run test:coverage    # Run tests with coverage

# Linting & Formatting
npm run lint             # Lint all code
npm run lint:fix         # Fix linting issues
npm run format           # Format code with Prettier

# Database
npm run db:migrate       # Run migrations
npm run db:seed          # Seed database
npm run db:reset         # Reset database

Project Structure

lifequest/
├── frontend/          # Next.js web dashboard
│   ├── src/
│   │   ├── app/      # Next.js 14 app directory
│   │   ├── components/
│   │   └── lib/
│   └── package.json
│
├── backend/           # Node.js Express API
│   ├── src/
│   │   ├── controllers/
│   │   ├── models/
│   │   ├── routes/
│   │   └── services/
│   └── package.json
│
├── mobile/            # React Native app
│   ├── src/
│   ├── android/
│   └── ios/
│
└── shared/            # Shared types & utilities
    ├── types/
    └── constants/

Troubleshooting

Database Connection Issues

# Check if PostgreSQL is running
psql --version

# Create database manually if needed
createdb lifequest

# Check connection
psql -U postgres -d lifequest

Port Already in Use

# Kill process on port 3000
lsof -ti:3000 | xargs kill -9

# Or change port in .env
PORT=3001

Module Not Found Errors

# Clean install
npm run clean
npm install

Next Steps

  1. 📖 Read the full documentation
  2. 🏗️ Explore the architecture
  3. 🔌 Check out the API documentation
  4. 🤝 Learn how to contribute

Getting Help


Happy coding! Level up your productivity! 🎮✨