How arik-0/utell works
Purpose and deployment shape
U-Tell is a university social platform: students publish experiences, ask career/campus questions, and interact with other users. It is a separate Vue single-page client and PHP Slim API backed by MySQL/MariaDB. The database schema and optional seed data are u-tell.sql and mock_data.sql.
Client application
The Vue 3/Vite client boots from app/src/main.js, renders the application root in app/src/App.vue, and maps browser navigation through app/src/router.js. Its primary user journeys are authentication, feed consumption, post detail, profile, registration, and creating consultas/experiencias, represented in app/src/views/Login.vue, app/src/views/Feed.vue, and app/src/views/CreateExperiencia.vue.
Client state and API boundary
Authentication state is centralized at app/src/store/auth.js; this is the main client-side boundary for session/identity-dependent navigation and API calls. Views submit and retrieve platform content through the backend rather than directly accessing the database. The client is packaged as a web SPA and includes Capacitor configuration in app/capacitor.config.json, indicating potential native mobile wrapping.
API entry and HTTP routing
Apache serves the API public root; rewrite behavior is defined in api/public/.htaccess and Slim is initialized by api/public/index.php. Endpoint groups are separated by domain: authentication in api/src/rutas/auth.php, users in api/src/rutas/usuarios.php, publications in api/src/rutas/publicaciones.php, plus institution and response routes.
Service and persistence layers
Route handlers delegate business behavior to services, notably api/src/Services/AuthService.php, api/src/Services/PublicacionService.php, and api/src/Services/UsuarioService.php. Services use repositories as the data-access boundary, including api/src/Repositories/UsuarioRepository.php, api/src/Repositories/PublicacionRepository.php, and api/src/Repositories/ConsultaRepository.php. Database connection/configuration is isolated in api/src/config/db.php (with a localhost alternative at api/src/config/db-localhost.php).
Domain model
The relational model covers identity and authorization (api/src/Models/Usuario.php, api/src/Models/Credencial.php, api/src/Models/GrupoPermiso.php); university structure (api/src/Models/Universidad.php, api/src/Models/Carrera.php, api/src/Models/Sede.php); and social content (api/src/Models/Publicacion.php, api/src/Models/Experiencia.php, api/src/Models/Consulta.php). Interaction and traceability include comments, friendships, and auditing through api/src/Models/Comentario.php, api/src/Models/Amistad.php, and api/src/Models/Auditoria.php.
End-to-end flow
A browser or Capacitor-hosted client navigates to a Vue view, reads auth state, and calls a Slim route. The route invokes its service, which applies domain logic and queries/updates MySQL through repositories/models; the API returns data to update view state. Authentication is the primary cross-cutting gate, while publication, consultation/response, user, and institution domains remain separated at route/service/repository boundaries.
Main entry points: PublicacionService.php Domain services · Feed.vue User journeys · index.php Slim entry point · PublicacionRepository.php Repositories
Components 16
Vue client
- Vue SPA · Browser and Capacitor-hosted social platform client.
app/src/main.js - Application root
app/src/App.vue - Browser routes
app/src/router.js - User journeys · Login, feed, post creation, profile, and registration flows.
app/src/views/Feed.vue - Auth state · Session and identity boundary for navigation and API calls.
app/src/store/auth.js - Native wrapper config
app/capacitor.config.json
Slim API
- Apache rewrite · Routes API requests to Slim's public entry point.
api/public/.htaccess - Slim entry point
api/public/index.php - Authentication routes
api/src/rutas/auth.php - Platform routes · User, publication, institution, consultation, and response endpoints.
api/src/rutas/publicaciones.php - Domain services · Authentication, publication, and user business behavior.
api/src/Services/PublicacionService.php
Persistence
- Repositories · User, publication, and consultation persistence boundary.
api/src/Repositories/PublicacionRepository.php - Database connection
api/src/config/db.php - Domain model · Identity, university structure, social content, interactions, and auditing.
api/src/Models/Usuario.php - MySQL / MariaDB · Platform data and authorization state.
u-tell.sql - Optional mock data
mock_data.sql
Connections 18
- Vue SPA → Application root: boots
- Application root → Browser routes: renders navigation
- Browser routes → User journeys: selects view
- User journeys → Auth state: reads session
- Vue SPA → Native wrapper config: can be wrapped by
- User journeys → Apache rewrite: API requests
- Auth state → Apache rewrite: authenticated calls
- Apache rewrite → Slim entry point: rewrites to
- Slim entry point → Authentication routes: registers
- Slim entry point → Platform routes: registers
- Authentication routes → Domain services: delegates
- Platform routes → Domain services: delegates
- Domain services → Repositories: queries and updates
- Domain services → Domain model: applies domain logic
- Repositories → Database connection: uses connection
- Repositories → Domain model: maps entities
- Database connection → MySQL / MariaDB: connects to
- Optional mock data → MySQL / MariaDB: optionally populates