# Business Requirements

## 1. Product Goal

Create a mobile-first web application for habit tracking with a light game layer.

Core idea:
Daily habits → quests → rewards → village development → EXP → leaderboard.

The project is an MVP / pet project.
No monetization, no anti-cheat, no social pressure mechanics.

---

## 2. Target Audience

- Users who want to build daily habits
- Users who like visual progress and game mechanics
- Mobile users as primary platform

---

## 3. Core User Loop

1. User opens the app
2. Completes a habit or daily quest
3. Receives coins
4. Spends coins on village development
5. Collects crops and gains EXP
6. Sees progress and leaderboard position
7. Returns the next day

---

## 4. Functional Requirements

### 4.1 User & Profile

- Registration and login via email + password
- One email = one account
- Email confirmation is NOT required (MVP)
- Profile contains:
  - public nickname
  - public avatar
  - settings:
    - sound on/off
    - confetti on/off

---

### 4.2 Habits

- Maximum 3 habits per user
- Habit fields:
  - name (custom or predefined)
  - active days of week
- Habits are:
  - permanent
  - editable
  - removable
- Missed days:
  - are not penalized
  - shown as red cells in calendar
- Completed days:
  - shown as green cells

---

### 4.3 Quests

#### Habit quests
- Can be completed only on active days
- Reward: 3 coins per completion

#### Daily quest
- “I visited the site today”
- Can be completed once per day
- Reward: 1 coin

#### Streak
- 5 consecutive daily visits → +10 coins
- Streak resets after reward

#### UX
- Quest completion triggers:
  - light confetti animation
  - short success sound
- Both effects can be disabled in settings

---

### 4.4 Village

- 2D isometric grid
- Grid fits into one mobile screen (no scroll)
- Two modes:
  - view mode
  - build mode

#### Objects
- House (1 house = 1 worker)
- Field
- Road
- Fence
- Obstacles (rocks, bushes, mushrooms)

#### Rules
- Fields cannot exceed number of workers
- Removing objects does NOT refund coins
- Removing houses blocks building new fields but does not remove existing ones

---

### 4.5 Crops & EXP

- Crop types:
  - Blueberries
  - Corn (grows longer)
- Growth:
  - real-time based
  - no acceleration mechanics
- Harvest:
  - manual
  - does not expire
- Rewards:
  - harvesting gives EXP
  - corn additionally gives +1 coin

---

### 4.6 Leaderboard

- Global leaderboard
- Period: monthly
- Sorted by EXP
- Shows:
  - rank
  - avatar
  - nickname
  - EXP
- Equal EXP results in shared ranks
  (e.g. 1, 2, 2, 2, 3, 4, 5, 5)

---

## 5. MVP Exclusions

The MVP explicitly excludes:
- donations or payments
- levels
- progress acceleration
- social features
- chat
- push notifications
- anti-cheat
- email verification
