How amrmohamed25/moneyfellows works
1. This is a single Laravel monolith, not a split frontend/backend app. The user interface is server-rendered with Blade templates, while Laravel handles routing, controllers, models, auth, scheduled jobs, and persistence.
2. The presentation layer lives in resources/views and app/View/Components, with shared layouts for guest/authenticated areas. The UI is built from Bootstrap, jQuery, and compiled assets in resources/js, resources/css, and public/ via Laravel Mix.
3. Request handling starts at public/index.php and flows through Laravel middleware in app/Http/Middleware and app/Http/Kernel.php. Main web routes are in routes/web.php; routes/api.php, routes/channels.php, and the Jetstream API-token views exist as supporting auth/platform features rather than a separate public API.
4. Authentication and account management are provided by Jetstream/Fortify. The app/Actions/Fortify and app/Actions/Jetstream classes implement registration, password reset/update, profile updates, and account deletion. The repo also includes 2FA, email verification, browser-session management, and API token management views/tests.
5. The core business domain is the “MoneyFellows” money-circle workflow, modeled around three main entities: Category, Current, and User. Categories are the admin-created templates; currents are active/instance money circles derived from a category; users join currents through the current_user pivot table.
6. app/Http/Controllers/CategoryController.php and app/Http/Controllers/CurrentsController.php are the main application controllers. Category management is the admin boundary, while currents controller likely drives user actions such as requesting to join, editing participation timing, leaving before start, and paying.
7. The persistence layer is Eloquent models plus migrations in database/migrations. Besides the core tables for users, categories, currents, and the current-user pivot, the schema includes notifications, sessions, failed jobs, password resets, and personal access tokens.
8. Payments are integrated through Laravel Cashier with Stripe, as described in the README. The payment flow is rendered in the payment.blade.php view and is tied to the current lifecycle: once a circle starts, users can pay their fee and the system tracks payment state and due dates.
9. Notifications are first-class in the architecture. app/Notifications/NotifyUser.php and the notifications table indicate Laravel’s notification system is used to alert users about starts, due dates, and payment-related events; the app relies on persisted notifications rather than only transient UI messages.
10. Time-based business logic is handled by Laravel’s scheduler and console command layer. app/Console/Commands/everyDay.php plus app/Console/Kernel.php are used to run daily checks for payment status, apply extra fees, collect payments, and update due dates. This is a key backend subsystem, not just a helper.
11. The app’s boundary between admin and user behavior is mostly business-rule driven rather than a separate role subsystem. The README describes the admin as the creator of categories, while users consume those categories to create/join currents; both use the same authentication system and diverge in controller/view behavior.
12. Operationally, this repository looks like a standard Laravel deployment with artisan, config/*, storage/*, and tests in tests/. The test suite is heavily focused on Jetstream/Fortify authentication features, which suggests the business workflows are implemented in the app code but are less exhaustively covered than the auth layer.
Main entry points: Current.php Current Model · CategoryController.php Web Controllers · everyDay.php Scheduler Command · Kernel.php HTTP Kernel
Components 20
Web App
HTTP handling, UI, and routing
- Front Door · Public entry script that boots Laravel for web requests
public/index.php - HTTP Kernel · Global middleware and request pipeline configuration
app/Http/Kernel.php - Web Routes · Main browser-facing route definitions
routes/web.php - Web Controllers · Main request handlers for categories and currents
app/Http/Controllers/CategoryController.php - Blade Views · Primary presentation layer with layouts, pages, and components
resources/views - UI Assets · Compiled CSS and JavaScript delivered through Laravel Mix
resources/js/app.js
Business Domain
Core money-circle workflow and persistence
- Category Model · Admin-created money-circle templates
app/Models/Category.php - Current Model · Active money-circle instances and their lifecycle state
app/Models/Current.php - User Model · Authenticated users participating in circles
app/Models/User.php - Schema Migrations · Tables for users, categories, currents, pivot links, and platform storage
database/migrations - Payment Flow · Stripe/Cashier-backed fee collection tied to current lifecycle
resources/views/payment.blade.php - Currents Controller · User actions around joining, leaving, timing, and payment steps
app/Http/Controllers/CurrentsController.php
Auth Platform
Jetstream/Fortify account and session features
- Auth Actions · Registration, password, profile, and account deletion logic
app/Actions/Fortify/CreateNewUser.php - Auth Views · Login, registration, password, 2FA, profile, and API token screens
resources/views/auth/login.blade.php - Session Features · Browser sessions, two-factor authentication, email verification, API tokens
tests/Feature/TwoFactorAuthenticationSettingsTest.php - Fortify Provider · Binds Fortify authentication behavior into the app
app/Providers/FortifyServiceProvider.php
Ops & Runtime
Scheduler, notifications, and deployment runtime
- Scheduler Command · Daily checks for payment status, fees, and due-date updates
app/Console/Commands/everyDay.php - Console Kernel · Registers scheduled backend tasks
app/Console/Kernel.php - Notifications · Persisted user alerts for starts, dues, and payment events
app/Notifications/NotifyUser.php - Framework Config · Application wiring for auth, database, queue, mail, and sessions
bootstrap/app.php
Connections 23
- Front Door → HTTP Kernel: boots · Requests enter Laravel through the middleware pipeline
- HTTP Kernel → Web Routes: dispatches · Kernel hands requests to route resolution
- Web Routes → Web Controllers: invokes · Web routes map to the main application controllers
- Web Controllers → Blade Views: renders · Controllers return Blade views to the browser
- Blade Views → UI Assets: uses · Views rely on compiled CSS and JavaScript assets
- Web Controllers → Category Model: manages · Category controller works with category templates
- Web Controllers → Current Model: manages · Currents controller operates on active circles
- Currents Controller → Current Model: updates · Participation and lifecycle actions affect current state
- Currents Controller → Payment Flow: triggers · Payment-related actions lead into the billing flow
- Payment Flow → Current Model: tracks · Payments are tied to the current lifecycle and due dates
- Category Model → Schema Migrations: persists · Category data is stored through migrations and Eloquent
- Current Model → Schema Migrations: persists · Current lifecycle and pivot membership are stored in the database
- User Model → Schema Migrations: persists · Users and auth-related platform tables are schema-backed
- Auth Actions → User Model: extends · Fortify/Jetstream actions operate on the user account
- Fortify Provider → Auth Actions: wires · Service provider binds auth actions into framework flows
- Auth Views → Auth Actions: supports · Auth and profile screens match the Fortify/Jetstream actions
- Session Features → Auth Views: surfaces · Two-factor, sessions, verification, and tokens are exposed in views
- Scheduler Command → Notifications: emits · Scheduled checks generate user notifications
- Console Kernel → Scheduler Command: runs · Console kernel schedules the daily command
- Scheduler Command → Current Model: checks · Daily job updates current payment status and due dates
- Notifications → User Model: alerts · Users receive persisted in-app notifications
- Framework Config → Fortify Provider: configures · Framework bootstrap loads the auth/platform providers
- Framework Config → HTTP Kernel: initializes · Bootstrap configuration prepares the HTTP kernel stack