How las-101/pushpace works
Purpose and Entry Points
This is a PHP-backed fitness activity tracker with static HTML frontend screens for login, dashboard, and activity-specific views. The primary browser entry point is index.php; authenticated user interactions are handled through API endpoints under api/.
Key entry points:
• index.php
• frontend/login.html
• frontend/dashboard.html
• frontend/script.js
Frontend Application Surface
The frontend is a multi-page browser UI rather than a bundled SPA. Separate pages represent the dashboard and activity modes, while shared JavaScript coordinates API calls and UI behavior.
Primary screens and shared assets:
• frontend/dashboard.html
• frontend/running.html
• frontend/walking.html
• frontend/gym.html
• frontend/script.js
• frontend/style.css
Authentication and User Identity Boundary
Authentication is isolated behind a dedicated PHP API endpoint. Client code should establish identity through this boundary before requesting or modifying profile and activity data. Session, credential, and authorization behavior are expected to be implemented server-side rather than trusted to the HTML pages.
Relevant boundary:
• api/auth.php
• frontend/login.html
• frontend/script.js
Activity Recording and Retrieval
Activity operations are separated into their own API endpoint, making activities the central domain resource. Running, walking, and gym pages likely submit or display activity-specific data through the same backend activity boundary, which should normalize storage and retrieval regardless of the originating UI page.
Relevant paths:
• api/activities.php
• frontend/running.html
• frontend/walking.html
• frontend/gym.html
Profile Management
User profile reads and updates are handled independently from authentication and activity tracking. This separation allows dashboard/profile presentation to evolve without coupling it to credential workflows or exercise records.
Relevant paths:
• api/profile.php
• api/auth.php
• frontend/dashboard.html
Backend Configuration and Database Persistence
PHP API handlers share a server-side configuration layer, likely including database connection setup and common runtime settings. Persistent schema is defined in SQL and is the contract connecting user/authentication, profile, and activity APIs.
Infrastructure and persistence:
• api/config.php
• database.sql
• api/auth.php
• api/activities.php
• api/profile.php
Primary Control Flow
1. A user enters through index.php or the login UI.
2. frontend/script.js sends authentication requests to api/auth.php.
3. Once authenticated, dashboard and activity pages request user/profile data and activity data.
4. Activity submissions flow to api/activities.php; profile changes flow to api/profile.php.
5. API handlers use api/config.php and persist or query records defined by database.sql.
The principal trust boundary is browser-to-PHP API: frontend pages are presentation clients, while authentication, validation, authorization, and database access belong in the api/ layer.
Main entry points: script.js Shared client logic · config.php Server configuration · login.html Login screen · auth.php Authentication API
Components 12
Browser UI
Static multi-page presentation client.
- Login screen
frontend/login.html - Dashboard
frontend/dashboard.html - Running view
frontend/running.html - Walking view
frontend/walking.html - Gym view
frontend/gym.html - Shared client logic · Coordinates UI behavior and API calls.
frontend/script.js
PHP API
Server-side trust and data boundary.
- Authentication API · Establishes identity and enforces authentication.
api/auth.php - Activities API · Normalizes activity recording and retrieval.
api/activities.php - Profile API · Handles user profile reads and updates.
api/profile.php - Server configuration · Shared database connection and runtime settings.
api/config.php
Other components
- PHP entry point
index.php - Database schema · Persistence contract for users, profiles, and activities.
database.sql
Connections 13
- PHP entry point → Login screen: enters via
- Login screen → Shared client logic: uses
- Dashboard → Shared client logic: uses
- Running view → Shared client logic: uses
- Walking view → Shared client logic: uses
- Gym view → Shared client logic: uses
- Shared client logic → Authentication API: authenticates
- Shared client logic → Profile API: reads and updates profile
- Shared client logic → Activities API: retrieves and submits activities
- Authentication API → Server configuration: uses
- Activities API → Server configuration: uses
- Profile API → Server configuration: uses
- Server configuration → Database schema: connects to