Initial commit — Rosary Presenter App
Full source for loveandrosary.com: slide-based Rosary/novena/Divine Mercy Chaplet presentation tool with multi-user roles, SVG bead ring, audio uploads, donate strip, and public session profiles. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
# Rosary Presenter
|
||||
|
||||
A multi-user web app for leading the Rosary, novenas, and the Divine Mercy Chaplet — built for live presentation at prayer services. Live at **[loveandrosary.com](https://loveandrosary.com)**.
|
||||
|
||||
## What It Does
|
||||
|
||||
- **Slide-based presentation** — navigate prayer-by-prayer with leader/congregation text split on screen
|
||||
- **Rosary bead ring** — SVG visualization tracks which bead is active in real time
|
||||
- **Session types** — General Rosary, Memorial Rosary, Deceased Novena, Divine Mercy Chaplet
|
||||
- **Novena groups** — link 9 daily sessions into one group with a public day-picker page
|
||||
- **Audio uploads** — attach MP3/audio per session (up to 50 MB)
|
||||
- **Multi-user** — role hierarchy: `superadmin` → `admin` → `superuser` → `user`
|
||||
- **Public profiles** — each user gets a `/username` page with their public sessions
|
||||
- **Donate strip** — optional PayPal / Venmo / Buy Me a Coffee link on public pages
|
||||
|
||||
## Stack
|
||||
|
||||
- PHP 8 + PDO (no framework, no Composer dependencies)
|
||||
- MySQL 8 / MariaDB
|
||||
- Vanilla JS (no build step)
|
||||
- Apache/Nginx with `.htaccess` rewrite rules
|
||||
|
||||
## Setup
|
||||
|
||||
### 1. Configure database
|
||||
|
||||
```bash
|
||||
cp config/db.example.php config/db.php
|
||||
# Edit config/db.php — fill in DB_HOST, DB_NAME, DB_USER, DB_PASS
|
||||
# Set BASE_URL if deploying to a subdirectory (e.g. '/rosary')
|
||||
```
|
||||
|
||||
### 2. Create the database schema
|
||||
|
||||
Visit `install.php` in your browser once to create all tables and seed the superadmin account. **Delete `install.php` immediately after.**
|
||||
|
||||
Default superadmin credentials: `supadmin` / `supadmin` — **change these immediately**.
|
||||
|
||||
### 3. Configure the web server
|
||||
|
||||
#### Apache — `.htaccess` is included. Enable `mod_rewrite` and set `AllowOverride All`.
|
||||
|
||||
#### Nginx — add to your server block:
|
||||
|
||||
```nginx
|
||||
location / {
|
||||
try_files $uri $uri/ @php;
|
||||
}
|
||||
location @php {
|
||||
rewrite ^/([^/]+)/([^/]+)$ /present.php?username=$1&slug=$2 last;
|
||||
rewrite ^/([^/]+)$ /profile.php?username=$1 last;
|
||||
}
|
||||
```
|
||||
|
||||
### 4. Uploads directory
|
||||
|
||||
```bash
|
||||
chmod 755 uploads/
|
||||
```
|
||||
|
||||
### 5. SMTP (optional)
|
||||
|
||||
Configure outbound email in **Admin → Settings** for registration confirmation and password reset emails. If left blank, the app will auto-confirm new users instead.
|
||||
|
||||
## Deployment Checklist
|
||||
|
||||
- [ ] `config/db.php` filled in with production credentials
|
||||
- [ ] `install.php` deleted after first run
|
||||
- [ ] `uploads/` is writable by the web server
|
||||
- [ ] `BASE_URL` matches your subdirectory path (leave empty for domain root)
|
||||
- [ ] Superadmin password and email changed
|
||||
- [ ] SMTP configured in Admin → Settings
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
Rosary/
|
||||
├── admin/ # Admin dashboard (auth-gated)
|
||||
│ ├── index.php # Dashboard home
|
||||
│ ├── setup.php # Create/edit a session
|
||||
│ ├── novena_group.php
|
||||
│ ├── users.php
|
||||
│ ├── settings.php # Site-wide settings (superadmin only)
|
||||
│ └── audio.php
|
||||
├── api/ # JSON endpoints (upload, save, delete)
|
||||
├── assets/
|
||||
│ ├── css/ # present.css, public.css, setup.css
|
||||
│ └── js/ # presenter.js, rosary.js, setup.js
|
||||
├── config/
|
||||
│ ├── db.example.php # Copy → db.php and fill in credentials
|
||||
│ └── db.php # (gitignored — contains real credentials)
|
||||
├── data/
|
||||
│ └── prayers.php # All prayer text + build_decade_slides()
|
||||
├── includes/
|
||||
│ ├── auth.php # require_auth(), current_user(), has_role()
|
||||
│ ├── build_slides.php
|
||||
│ ├── donate.php
|
||||
│ └── mailer.php
|
||||
├── uploads/ # User-uploaded audio (gitignored)
|
||||
├── index.php # Public home — card grid of sessions
|
||||
├── present.php # Presentation player (public)
|
||||
├── novena_public.php # Novena day-picker (public)
|
||||
├── install.php # Run once, then delete
|
||||
└── .htaccess # URL rewriting
|
||||
```
|
||||
|
||||
## URL Routing
|
||||
|
||||
| URL | Resolves to |
|
||||
|-----|-------------|
|
||||
| `/username/slug` | `present.php?username=X&slug=Y` |
|
||||
| `/username` | `profile.php?username=X` |
|
||||
| `/username/novena-slug` | Redirects to `novena_public.php?group_id=X` |
|
||||
|
||||
## License
|
||||
|
||||
Private project — all rights reserved.
|
||||
Reference in New Issue
Block a user