Browse Source

Readme added

sebastian 1 tuần trước cách đây
mục cha
commit
4bc06ee390
1 tập tin đã thay đổi với 66 bổ sung0 xóa
  1. 66 0
      README.md

+ 66 - 0
README.md

@@ -0,0 +1,66 @@
+# PackIt
+
+PackIt is a smart packing list generator for outdoor activities. Select the activities you're planning — camping, skiing, kayaking, and more — and PackIt produces a deduplicated, grouped checklist of everything you need to bring.
+
+## How it works
+
+1. **Choose your activities** — Pick one or more activities from the activity selection page. Activities are organised into groups (e.g. Overnight, Water Activities, Winter Sports).
+2. **Generate your list** — PackIt merges all item requirements across your selected activities, removing duplicates, and groups the result by category (Clothing, Shelter, Navigation, etc.).
+3. **Pack and check off** — Work through the interactive checklist, ticking items as you pack them. A progress bar tracks how far along you are.
+4. **Share or print** — Every list gets a permanent, shareable URL. You can also print the list directly from the browser.
+
+## Features
+
+- **Activity-based list generation** — Items are mapped to activities in the database. Selecting multiple activities produces a single merged list with no duplicate entries.
+- **Grouped items** — Items are organised into logical categories (Clothing, Shelter, Navigation, Medical, Water & Food, Safety Gear) for easy scanning.
+- **Interactive checklist** — Click any item to mark it as packed. Checked items are visually struck through and a progress bar updates in real time.
+- **Shareable URLs** — Each unique activity selection is stored with a SHA-256 hash and accessible via a permanent link you can send to teammates or trip partners.
+- **Print support** — The packing list page has a print stylesheet that removes UI chrome and renders a clean black-and-white checklist.
+- **Admin panel** — A password-protected admin interface at `/admin/` lets you manage all content:
+  - Activity groups and activities
+  - Item groups and items
+  - Activity-to-item mappings
+  - Dashboard with counts of all entities
+
+## Tech stack
+
+- **Backend:** PHP with PDO
+- **Database:** MySQL (schema in `schema.sql`)
+- **Frontend:** Vanilla HTML/CSS/JS — no build step required
+
+## Setup
+
+1. Create the database by running `schema.sql`:
+   ```
+   mysql -u <user> -p < schema.sql
+   ```
+2. Copy `config.php` and set your database credentials.
+3. Serve the project with any PHP-capable web server (Apache, Nginx, PHP built-in server).
+4. Open the site in a browser and start selecting activities.
+
+### Default admin credentials
+
+| Username | Password      |
+|----------|---------------|
+| `admin`  | `packit-admin` |
+
+**Change the password after first login.**
+
+## Project structure
+
+```
+index.php              Activity selection page
+list.php               Processes selection, stores hash, redirects
+packing.php            Displays the shareable packing list
+db.php                 PDO connection helper
+config.php             Database credentials
+schema.sql             Database schema and sample data
+admin/
+  index.php            Dashboard
+  activities.php       Manage activities
+  activity_groups.php  Manage activity groups
+  items.php            Manage items
+  item_groups.php      Manage item groups
+  mappings.php         Manage activity-to-item mappings
+  login.php / auth.php Authentication
+```