Proyecto: Salesforce Admin Learning Platform (Plataforma Integral)
Equipo: VISIONARY ADMINS
VersiΓ³n: 0.30.0 (Web Platform MVP)
Fecha: 17 Enero 2026
Tipo: AplicaciΓ³n Web Full-Stack con Contenido DinΓ‘mico
EvoluciΓ³n del Proyecto:
Problema a Resolver: Crear una plataforma web integral que combine:
Objetivo del MVP (v0.30.0): Migrar la documentaciΓ³n estΓ‘tica a una aplicaciΓ³n web que:
Core Features:
Contenido:
Infraestructura:
| Rol | Responsabilidad | Persona |
|---|---|---|
| Product Owner | VisiΓ³n del producto, priorizaciΓ³n, validaciΓ³n | Wilmer (Usuario ΓΊnico) |
| AI Agent | Asume mΓΊltiples roles segΓΊn fase (Tech Lead, Backend Dev, Frontend Dev, QA, DevOps, Code Reviewer) | Gemini AI |
| Developer/Implementador | Ejecuta cΓ³digo, prueba, reporta errores, valida funcionalidad | Wilmer (Usuario ΓΊnico) |
| Content Manager | ActualizaciΓ³n de Markdown | Wilmer (Usuario ΓΊnico) |
| End Users | Estudiantes del curso | 5-10 miembros VISIONARY ADMINS |
| Fase | DuraciΓ³n | Entregables |
|---|---|---|
| PlanificaciΓ³n | 1 dΓa | SDLC, Roadmap, Task List, AI Role Framework |
| AnΓ‘lisis | 1 dΓa | Requerimientos, User Stories |
| DiseΓ±o | 2 dΓas | Arquitectura, DB Schema |
| RefactorizaciΓ³n | 1 dΓa | Nueva estructura de carpetas |
| Desarrollo Backend | 6 dΓas | API, Auth, DB, Markdown Renderer |
| Desarrollo Frontend | 5 dΓas | Templates, CSS, JavaScript |
| IntegraciΓ³n | 2 dΓas | Backend + Frontend + Contenido |
| Pruebas | 3 dΓas | Unit, Integration, Manual |
| Deploy | 1 dΓa | Render setup, migrations |
| DocumentaciΓ³n | 1 dΓa | API docs, User guide |
| TOTAL | ~24 dΓas (4 semanas) | v0.30.0 en producciΓ³n |
Nota: Timeline para desarrollo solo con AI Agent. Desarrollo paralelo de mΓΊltiples features no es posible.
Costo Total: $0 USD
| Recurso | Proveedor | Costo |
|---|---|---|
| Hosting Web | Render Free Tier | $0 |
| Database | PostgreSQL (Render) | $0 |
| Domain | Render subdomain | $0 |
| Git Hosting | GitHub | $0 |
| Desarrollo | Equipo (voluntario) | $0 |
Limitaciones Free Tier:
.md del repositorio y renderizarlos como HTML.Given que estoy autenticado
When navego a "Curriculum β Sprint 1 β Semana 1 β Clase 1 TeorΓa"
Then veo el contenido Markdown renderizado como HTML
And veo un sidebar con el Γndice de la clase
And veo breadcrumbs de navegaciΓ³n
And veo botones "Anterior" y "Siguiente"
Given que estoy viendo una clase
When marco el checkbox "Clase completada"
Then el sistema guarda mi progreso en la base de datos
And mi % de progreso del Sprint se actualiza
And el checkbox permanece marcado al recargar la pΓ‘gina
Given que estoy en el dashboard
When veo la secciΓ³n "Mi Progreso"
Then veo mi % de completitud del Sprint 1
And veo cuΓ‘ntas clases he completado
And veo cuΓ‘ntos Superbadges he terminado
And veo cuΓ‘ntos dΓas quedan para el deadline
Given que estoy en el dashboard
When navego a la pestaΓ±a "Equipo"
Then veo una tabla con todos los miembros
And veo el % de progreso de cada uno
And veo mi posiciΓ³n en el ranking
And la tabla se actualiza automΓ‘ticamente cada 30 segundos
Given que tengo acceso al repositorio
When edito un archivo Markdown y hago git push
Then la plataforma detecta el cambio (webhook o polling)
And actualiza el contenido automΓ‘ticamente
And los usuarios ven el nuevo contenido sin necesidad de redeploy
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β USUARIOS (Web Browser) β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β HTTPS
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RENDER WEB SERVICE β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β FASTAPI APPLICATION β β
β β βββββββββββββββββββββββββββββββββββββββββββββββ β β
β β β Routers β β β
β β β ββ /auth (login, register, logout) β β β
β β β ββ /docs (render markdown) β β β
β β β ββ /progress (track user progress) β β β
β β β ββ /api (REST endpoints) β β β
β β βββββββββββββββββββββββββββββββββββββββββββββββ β β
β β βββββββββββββββββββββββββββββββββββββββββββββββ β β
β β β Services (Business Logic) β β β
β β β ββ MarkdownRenderer β β β
β β β ββ AuthService β β β
β β β ββ ProgressService β β β
β β βββββββββββββββββββββββββββββββββββββββββββββββ β β
β β βββββββββββββββββββββββββββββββββββββββββββββββ β β
β β β Models (SQLAlchemy ORM) β β β
β β β ββ User β β β
β β β ββ Sprint β β β
β β β ββ Task β β β
β β β ββ UserProgress β β β
β β βββββββββββββββββββββββββββββββββββββββββββββββ β β
β β βββββββββββββββββββββββββββββββββββββββββββββββ β β
β β β Templates (Jinja2) β β β
β β β ββ base.html β β β
β β β ββ dashboard.html β β β
β β β ββ doc_viewer.html β β β
β β β ββ team.html β β β
β β βββββββββββββββββββββββββββββββββββββββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β SQL
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RENDER POSTGRESQL DATABASE β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Tables: β β
β β ββ users β β
β β ββ sprints β β
β β ββ tasks β β
β β ββ user_progress β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GITHUB REPOSITORY β
β (Contenido Markdown - Source of Truth) β
β ββ curriculum/ β
β ββ Superbadges/ β
β ββ Practica_Financiera/ β
β ββ Gestor_de_Versiones/ β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β Git Pull / Webhook
βΌ
[FastAPI App]
-- users table
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
password_hash VARCHAR(255) NOT NULL,
team VARCHAR(50) DEFAULT 'VISIONARY ADMINS',
role VARCHAR(20) DEFAULT 'student', -- 'student', 'instructor', 'admin'
is_active BOOLEAN DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
last_login TIMESTAMP
);
-- sprints table
CREATE TABLE sprints (
id SERIAL PRIMARY KEY,
number INTEGER NOT NULL UNIQUE,
name VARCHAR(100) NOT NULL,
description TEXT,
start_date DATE NOT NULL,
end_date DATE NOT NULL,
is_active BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- tasks table (auto-generated from Markdown structure)
CREATE TABLE tasks (
id SERIAL PRIMARY KEY,
sprint_id INTEGER REFERENCES sprints(id) ON DELETE CASCADE,
category VARCHAR(50) NOT NULL, -- 'Clase', 'Superbadge', 'Practica'
title VARCHAR(200) NOT NULL,
description TEXT,
markdown_path VARCHAR(500) NOT NULL, -- Path relativo al repo
order_index INTEGER DEFAULT 0,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE(sprint_id, markdown_path)
);
-- user_progress table
CREATE TABLE user_progress (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
task_id INTEGER REFERENCES tasks(id) ON DELETE CASCADE,
status VARCHAR(20) DEFAULT 'not_started', -- 'not_started', 'in_progress', 'completed'
started_at TIMESTAMP,
completed_at TIMESTAMP,
notes TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE(user_id, task_id)
);
-- indexes for performance
CREATE INDEX idx_user_progress_user_id ON user_progress(user_id);
CREATE INDEX idx_user_progress_task_id ON user_progress(task_id);
CREATE INDEX idx_user_progress_status ON user_progress(status);
CREATE INDEX idx_tasks_sprint_id ON tasks(sprint_id);
CREATE INDEX idx_tasks_markdown_path ON tasks(markdown_path);
CREATE INDEX idx_users_email ON users(email);
POST /api/auth/register - Registrar nuevo usuario
POST /api/auth/login - Iniciar sesiΓ³n (retorna JWT)
POST /api/auth/logout - Cerrar sesiΓ³n
GET /api/auth/me - Obtener usuario actual
GET /docs/{path:path} - Renderizar Markdown dinΓ‘micamente
Ejemplo: /docs/curriculum/sprint_01/semana_01/01-clase_1_teoria
GET /api/progress/me - Progreso del usuario actual
GET /api/progress/team - Progreso de todo el equipo
POST /api/progress/task/{task_id}/mark - Marcar tarea (toggle status)
PATCH /api/progress/{id} - Actualizar notas de tarea
GET /api/sprints - Listar todos los sprints
GET /api/sprints/{id} - Obtener sprint especΓfico
GET /api/sprints/{id}/tasks - Obtener tareas del sprint
GET /api/tasks/{id} - Obtener tarea especΓfica
GET /api/users - Listar todos los usuarios
GET /api/users/{id} - Obtener usuario especΓfico
PATCH /api/users/{id} - Actualizar usuario
DELETE /api/users/{id} - Desactivar usuario
salesforce_admin/
βββ app/ # AplicaciΓ³n FastAPI
β βββ __init__.py
β βββ main.py # Entry point
β βββ config.py # ConfiguraciΓ³n (env vars)
β βββ database.py # DB connection
β βββ dependencies.py # Dependency injection
β βββ models/ # SQLAlchemy models
β β βββ __init__.py
β β βββ user.py
β β βββ sprint.py
β β βββ task.py
β β βββ progress.py
β βββ schemas/ # Pydantic schemas
β β βββ __init__.py
β β βββ user.py
β β βββ sprint.py
β β βββ task.py
β β βββ progress.py
β βββ routers/ # API routes
β β βββ __init__.py
β β βββ auth.py
β β βββ docs.py # Markdown rendering
β β βββ progress.py
β β βββ sprints.py
β β βββ users.py
β βββ services/ # Business logic
β β βββ __init__.py
β β βββ auth_service.py
β β βββ markdown_service.py # Markdown β HTML
β β βββ progress_service.py
β β βββ task_service.py
β βββ middleware/
β β βββ __init__.py
β β βββ auth.py
β β βββ cors.py
β β βββ logging.py
β βββ templates/ # Jinja2 templates
β β βββ base.html
β β βββ components/
β β β βββ navbar.html
β β β βββ sidebar.html
β β β βββ breadcrumbs.html
β β βββ auth/
β β β βββ login.html
β β β βββ register.html
β β βββ dashboard.html
β β βββ doc_viewer.html # Renderiza Markdown
β β βββ team.html
β βββ static/ # Assets estΓ‘ticos
β βββ css/
β β βββ tailwind.css
β β βββ custom.css
β βββ js/
β β βββ alpine.js
β β βββ app.js
β βββ images/
βββ content/ # Contenido Markdown (sin cambios)
β βββ curriculum/
β βββ Superbadges/
β βββ Practica_Financiera/
β βββ Gestor_de_Versiones/
βββ tests/ # Tests
β βββ __init__.py
β βββ conftest.py
β βββ test_auth.py
β βββ test_markdown.py
β βββ test_progress.py
β βββ test_api.py
βββ alembic/ # DB migrations
β βββ versions/
β βββ env.py
βββ docs/ # DocumentaciΓ³n del proyecto
β βββ SDLC.md # Este documento
β βββ DEVELOPMENT_RULES.md # Reglas de desarrollo
β βββ ROADMAP.md # Roadmap del proyecto
β βββ TASK_LIST.md # Lista de tareas
β βββ IMPLEMENTATION_PLAN.md # Plan de implementaciΓ³n
β βββ API.md # DocumentaciΓ³n de API
β βββ DEPLOYMENT.md # GuΓa de deploy
βββ scripts/ # Scripts de utilidad
β βββ seed_data.py # Cargar datos iniciales
β βββ sync_tasks.py # Sincronizar tareas desde Markdown
β βββ backup_db.py # Backup de base de datos
βββ .env.example # Ejemplo de variables de entorno
βββ .gitignore
βββ requirements.txt # Dependencias Python
βββ docker-compose.yml # Para desarrollo local
βββ render.yaml # ConfiguraciΓ³n de Render
βββ README.md # README principal
| Capa | TecnologΓa | VersiΓ³n | JustificaciΓ³n |
|---|---|---|---|
| Backend | FastAPI | 0.109+ | Async, rΓ‘pido, autodocumentaciΓ³n |
| ORM | SQLAlchemy | 2.0+ | ORM maduro, async support |
| Database | PostgreSQL | 15+ | Relacional, robusto |
| Auth | python-jose | 3.3+ | JWT tokens |
| Password | passlib[bcrypt] | 1.7+ | Bcrypt hashing |
| Markdown | python-markdown | 3.5+ | Markdown β HTML |
| Templates | Jinja2 | 3.1+ | Server-side rendering |
| JS Framework | Alpine.js | 3.13+ | Interactividad (3KB) |
| CSS | TailwindCSS | 3.4+ | Utility-first |
| Testing | pytest | 7.4+ | Unit & integration tests |
| Migrations | Alembic | 1.13+ | DB schema versioning |
| Deploy | Render | - | Free tier, auto-deploy |
# Imports ordenados (isort)
from typing import List, Optional
from fastapi import APIRouter, Depends
from sqlalchemy.orm import Session
from app.models.user import User
from app.schemas.user import UserCreate
from app.services.auth_service import AuthService
# Naming conventions
class UserService: # PascalCase para clases
def get_user_by_email(self): # snake_case para mΓ©todos
user_email = "test@example.com" # snake_case para variables
# Type hints obligatorios
def create_user(
user_data: UserCreate,
db: Session = Depends(get_db)
) -> User:
"""
Crea un nuevo usuario en el sistema.
Args:
user_data: Datos del usuario a crear
db: SesiΓ³n de base de datos
Returns:
User: Usuario creado
Raises:
ValueError: Si el email ya existe
"""
pass
# Constants en UPPER_CASE
MAX_LOGIN_ATTEMPTS = 5
DEFAULT_PAGE_SIZE = 20
feat(auth): add JWT token refresh endpoint
fix(markdown): correct relative link resolution
docs(api): update progress endpoints documentation
test(users): add unit tests for user service
refactor(models): simplify user_progress relationship
style(frontend): format templates with prettier
chore(deps): update fastapi to 0.109.0
main (production)
β
develop (staging)
β
feature/add-markdown-renderer
feature/implement-auth
hotfix/fix-login-error
## DescripciΓ³n
[DescripciΓ³n clara de los cambios]
## Tipo de cambio
- [ ] Bug fix
- [ ] Nueva feature
- [ ] Breaking change
- [ ] DocumentaciΓ³n
## Checklist
- [ ] Tests agregados/actualizados
- [ ] DocumentaciΓ³n actualizada
- [ ] Code review solicitado
- [ ] CI/CD pasa
/\
/ \ E2E Tests (5%)
/ββββ\ - Playwright
/ \ - User flows crΓticos
/ββββββββ\
/ \ Integration Tests (20%)
/ββββββββββββ\ - API endpoints
/ \- DB queries
/ββββββββββββββββ\
Unit Tests (75%)
- Services
- Models
- Utilities
MΓnimo aceptable: 75% coverage
Objetivo: 85% coverage
pytest --cov=app --cov-report=html --cov-report=term
services:
- type: web
name: salesforce-admin-platform
env: python
buildCommand: |
pip install -r requirements.txt
alembic upgrade head
python scripts/seed_data.py
startCommand: uvicorn app.main:app --host 0.0.0.0 --port $PORT
envVars:
- key: DATABASE_URL
fromDatabase:
name: salesforce-admin-db
property: connectionString
- key: SECRET_KEY
generateValue: true
- key: ENVIRONMENT
value: production
databases:
- name: salesforce-admin-db
databaseName: salesforce_admin
user: admin
MΓ©tricas:
Herramientas:
| MΓ©trica | Objetivo v0.30.0 |
|---|---|
| AdopciΓ³n | 90% del equipo usa la plataforma |
| Engagement | Usuarios activos 4+ veces/semana |
| Performance | 95% requests < 500ms |
| Bugs | < 3 bugs crΓticos en primer mes |
| SatisfacciΓ³n | NPS > 8/10 |
Documento creado por: Equipo VISIONARY ADMINS
Γltima actualizaciΓ³n: 17 Enero 2026
VersiΓ³n: 1.0