ΓHub is an advanced full-stack platform for orchestrating and automating interactions with academic portals. By leveraging a headless browser engine, the system enables extraction, synchronization, and management of university data and multimedia assets within a unified, centralized dashboard.
This project want to be a advanced dashboard to automate everyday task and have a general and fast look of the main information we need to see/know.
- Headless Academic Automation: Automated login, logout, and academic status retrieval using Playwright.
- Session Persistence: Advanced management of browser cache, cookies, and local storage (
playwright_session/) enabling instant access without re-authentication. - Task Orchestration: Dedicated module (
orchestrator.py) for coordinating complex operations and asynchronous workflows with ai and in the future agent. - Media Management: Upload, download, and processing of multimedia assets (
media.py). - Responsive Interface: Modern frontend built with Next.js (App Router).
- Containerized Infrastructure: Reproducible deployment using Docker and Docker Compose.
The architecture follows a decoupled client-server pattern. The frontend acts as a presentation layer and API proxy, while the backend handles business logic, browser orchestration, and data access.
graph TD
Client[Browser / Client] -->|HTTP| NextJS[Next.js Frontend]
NextJS -->|REST API| Backend[Python Backend]
subgraph Backend Services
Backend --> AcademicRouter[Academic Router]
Backend --> MediaRouter[Media Router]
Backend --> Orchestrator[Orchestrator]
Orchestrator --> Playwright[Playwright Engine]
AcademicRouter --> Playwright
Playwright <-->|Read / Write| SessionCache[(Playwright Session Storage)]
AcademicRouter --> Database[(Database)]
MediaRouter --> Database
end
The repository is organized as a monorepo, with a clear separation between frontend and backend components.
aesoul-hub/
βββ backend/ # Python backend
β βββ routers/ # API controllers
β β βββ academic.py # Academic data management
β β βββ media.py # File and asset processing
β β βββ orchestrator.py # Workflow and queue management
β βββ playwright_session/ # Persistent browser profile storage
β βββ database.py # ORM and database connection
β βββ main.py # Application entry point
β βββ pyproject.toml # Python dependencies
β βββ dockerfile # Backend container image
β
βββ frontend/ # Next.js frontend
β βββ src/app/ # App Router and API Routes
β βββ public/ # Static assets
β βββ components.json # UI configuration
β βββ next.config.js # Next.js configuration
β βββ package.json # Node.js dependencies
β βββ dockerfile # Frontend container image
β
βββ docker-compose.yaml # Stack orchestration
| Category | Technology | Purpose |
|---|---|---|
| Frontend | Next.js (React) | User interface, SSR, and API proxy |
| Backend | Python (FastAPI*) | REST APIs, business logic, and orchestration |
| Automation | Playwright | Browser automation and web scraping |
| Database | SQLite / PostgreSQL | Data persistence and logging |
| DevOps | Docker & Docker Compose | Containerization and deployment |
*FastAPI inferred from the presence of
routers/andmain.py.
- Linux (Ubuntu/Debian recommended)
- macOS
- Windows (preferably via WSL2)
- Docker 24.0+
- Docker Compose 2.0+
git clone https://github.com/your-org/aesoul-hub.git
cd aesoul-hubCreate the required .env files following the examples provided in the documentation.
docker-compose up --build -dhttp://localhost:2003
http://localhost:3002
Environment variables control the application's behavior.
| Variable | Description | Required | Example |
|---|---|---|---|
| DATABASE_URL | Database connection string | β | postgresql://user@db:5432/aesoul |
| PLAYWRIGHT_HEADLESS | Runs the browser in headless mode | β | true |
| API_SECRET_KEY | JWT token secret key | β | super-secret-token |
| NEXT_PUBLIC_API_URL | Backend URL used by the frontend | β | http://localhost:8000 |
Starts an authenticated session using Playwright.
{
"username": "student_id",
"password": "password"
}- Performs automated authentication
- Saves the browser session
- Invalidates the current session
- Removes persistent cookies and session data
{
"status": "active",
"grades": []
}Retrieves the user's current academic status.
Persistence management is centralized in:
backend/database.py
Stores:
- User identifiers
- Preferences
- Authentication information
Tracks:
- Uploaded files
- Processing operations
- Associated metadata
Records:
- Synchronization events
- Automation execution results
- Errors and operational logs
A structured testing suite is currently not available.
Use:
pytest
to validate:
- Routers
- Services
- Business logic
Use:
Playwright Test
to validate:
- React user interface
- Authentication workflows
- Scraping and automation processes
The project is already prepared for containerized environments.
Ensure that:
backend/playwright_session/
is mounted as a persistent volume and excluded from Git version control.
Configure:
- NGINX
- Traefik
for:
- HTTPS
- Load balancing
- Security
Set:
PLAYWRIGHT_HEADLESS=truein server environments.
The directory:
playwright_session/
contains:
- Cookies
- Tokens
- Temporary credentials
Access should be restricted at the filesystem level.
Never store:
- Academic credentials
- Tokens
- API keys
inside the repository.
Always use:
HTTPS/TLS
between:
- Frontend
- Backend
- Academic portals
Caching Playwright data in:
playwright_session/Default/
reduces:
- Repeated logins
- Static resource loading
- Response times
Each Playwright browser instance consumes a significant amount of RAM.
Implement:
- Redis
- Celery
- Dedicated workers
to distribute workloads managed by:
orchestrator.py
- CAPTCHA introduced by the target portal
- Changes to the target DOM structure
Run with:
PLAYWRIGHT_HEADLESS=falseand perform visual debugging of the automation process.
Also check logs located in:
playwright_session/Default/LOG
High concurrency on SQLite.
Migrate to PostgreSQL by updating the configuration in:
backend/database.py
- integrated some agent to expand/automate ai and task(web search, add avento to calendar, ...etc.)
- Create an administrative dashboard for automation monitoring.
- Implement observability with Prometheus and Grafana.
- Proprietary
| Area | Assessment |
|---|---|
| Architecture | Good |
| Code Organization | Good |
| Security | Needs Improvement |
| Testing | Insufficient |
| Scalability | Moderate |
| Deployment | Good |
| Observability | Limited |
| Overall Maturity | 70/100 |
- Implement an automated testing suite.
- Introduce secure secret management.
- Add centralized monitoring and logging.
- Start implement agent.