Skip to content

BOUNADRAME/csweb-community

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

120 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CSWeb Community Platform

CSWeb Logo Version License Documentation GitHub Issues GitHub Stars

Democratiser CSWeb pour l'Afrique - Setup en 5 minutes au lieu de 2-3 jours

Documentation | Issues


Vision

CSWeb Community Platform transforme CSWeb en une plateforme moderne, facile a deployer et accessible a tous les instituts statistiques.

Base officielle : Ce projet est base sur CSWeb 8 telecharge depuis le site officiel csprousers.org/downloads. Toutes nos ameliorations sont construites sur cette base officielle et maintiennent une compatibilite 100% avec CSWeb vanilla.

CSWeb Vanilla CSWeb Community
Setup 2-3 jours Setup 5 minutes (Docker)
MySQL uniquement Multi-DB (PostgreSQL, MySQL, SQL Server)
Breakout global (lent) Breakout selectif par dictionnaire
Pas de monitoring Logs streaming temps reel
Documentation dispersee Documentation complete (Nextra)

Quick Start

# 1. Cloner le projet
git clone https://github.com/BOUNADRAME/csweb-community.git
cd csweb-community

# 2. Configurer l'environnement
cp .env.example .env
# Editer .env : renseigner les mots de passe et choisir BREAKOUT_DB_TYPE

# 3. Lancer (voir section "Modes de deploiement" ci-dessous)
docker compose --profile local-postgres up -d

Modes de deploiement

CSWeb supporte 6 configurations selon le type de base breakout et le mode (local Docker ou serveur distant).

PostgreSQL (recommande)

Local β€” container Docker sur la meme machine
# .env
BREAKOUT_MODE=local
BREAKOUT_DB_TYPE=postgresql
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_DATABASE=csweb_analytics
POSTGRES_USER=csweb_analytics
POSTGRES_PASSWORD=CHANGEZ_MOT_DE_PASSE

# Lancer
docker compose --profile local-postgres up -d

Services : CSWeb (:8080) + MySQL metadata (:3306) + PostgreSQL breakout (:5432)

Remote β€” serveur PostgreSQL distant
# .env
BREAKOUT_MODE=remote
BREAKOUT_DB_TYPE=postgresql
POSTGRES_HOST=votre-serveur-pg.example.com
POSTGRES_PORT=5432
POSTGRES_DATABASE=csweb_analytics
POSTGRES_USER=csweb_analytics
POSTGRES_PASSWORD=votre_mot_de_passe

# Lancer (pas de container breakout)
docker compose up -d csweb mysql

Services : CSWeb (:8080) + MySQL metadata (:3306). PostgreSQL est sur le serveur distant.

MySQL

Local β€” container Docker sur la meme machine (port 3307)
# .env
BREAKOUT_MODE=local
BREAKOUT_DB_TYPE=mysql
MYSQL_BREAKOUT_HOST=mysql-breakout
MYSQL_BREAKOUT_PORT=3307
MYSQL_BREAKOUT_DATABASE=csweb_breakout
MYSQL_BREAKOUT_USER=breakout_user
MYSQL_BREAKOUT_PASSWORD=CHANGEZ_MOT_DE_PASSE

# Lancer
docker compose --profile local-mysql up -d

Services : CSWeb (:8080) + MySQL metadata (:3306) + MySQL breakout (:3307)

Remote β€” serveur MySQL distant
# .env
BREAKOUT_MODE=remote
BREAKOUT_DB_TYPE=mysql
MYSQL_BREAKOUT_HOST=votre-serveur-mysql.example.com
MYSQL_BREAKOUT_PORT=3306
MYSQL_BREAKOUT_DATABASE=csweb_breakout
MYSQL_BREAKOUT_USER=breakout_user
MYSQL_BREAKOUT_PASSWORD=votre_mot_de_passe

# Lancer
docker compose up -d csweb mysql

Services : CSWeb (:8080) + MySQL metadata (:3306). MySQL breakout est sur le serveur distant.

SQL Server

Local β€” container Docker sur la meme machine (2 GB RAM min.)
# .env
BREAKOUT_MODE=local
BREAKOUT_DB_TYPE=sqlserver
SQLSERVER_HOST=sqlserver
SQLSERVER_PORT=1433
SQLSERVER_DATABASE=CSWeb_Analytics
SQLSERVER_USER=sa
SQLSERVER_PASSWORD=VotreStrong!Passw0rd

# Lancer
docker compose --profile local-sqlserver up -d

Services : CSWeb (:8080) + MySQL metadata (:3306) + SQL Server breakout (:1433)

Remote β€” serveur SQL Server distant
# .env
BREAKOUT_MODE=remote
BREAKOUT_DB_TYPE=sqlserver
SQLSERVER_HOST=votre-serveur-sql.example.com
SQLSERVER_PORT=1433
SQLSERVER_DATABASE=CSWeb_Analytics
SQLSERVER_USER=sa
SQLSERVER_PASSWORD=VotreMotDePasse!

# Lancer
docker compose up -d csweb mysql

Services : CSWeb (:8080) + MySQL metadata (:3306). SQL Server est sur le serveur distant.

Outils de developpement (optionnel)

# Ajouter --profile dev pour phpMyAdmin (:8081) et pgAdmin (:8082)
docker compose --profile local-postgres --profile dev up -d

Resume des commandes

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    SGBD    β”‚  Mode  β”‚                    Commande                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ PostgreSQL β”‚ Local  β”‚ docker compose --profile local-postgres up -d  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ PostgreSQL β”‚ Remote β”‚ docker compose up -d csweb mysql               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ MySQL      β”‚ Local  β”‚ docker compose --profile local-mysql up -d     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ MySQL      β”‚ Remote β”‚ docker compose up -d csweb mysql               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ SQL Server β”‚ Local  β”‚ docker compose --profile local-sqlserver up -d β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ SQL Server β”‚ Remote β”‚ docker compose up -d csweb mysql               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Premier Breakout

# Breakout selectif par dictionnaire
docker exec -it csweb-app php bin/console csweb:process-cases-by-dict VOTRE_DICTIONNAIRE

Performance Tuning

Toutes les configurations PHP, MySQL, PostgreSQL et Apache sont pilotables depuis .env. Voir .claude/PERFORMANCE-TUNING.md pour le guide complet.

# Verifier la configuration
docker exec csweb-app php bin/console csweb:check-config

# Avec test des connexions
docker exec csweb-app php bin/console csweb:check-config --test-connections

Stack Technique

  • Backend : Symfony 5.4 LTS, PHP 8.1+
  • Databases : MySQL 8.0 (metadata) + PostgreSQL 16 / MySQL 8.0 / SQL Server 2022 (breakout)
  • Frontend : Twig, jQuery, Bootstrap 4, DataTables
  • DevOps : Docker + Docker Compose
  • Documentation : Nextra 2.13 (48 pages)

Documentation

Documentation complete : https://bounadrame.github.io/csweb-community/


Contributeurs

Bouna DRAME - Lead Developer

Assietou Diagne - Developer, ANSD

  • Breakout selectif par dictionnaire

Production Validee

  • ANSD (Senegal) - Recensement (RGPH5) et enquetes
  • Gambie - Recensement
  • Guinee - Recensement
  • Statinfo - Enquetes

License

Apache License 2.0 - Voir LICENSE


Support


Made with love for African Statistical Institutes

About

πŸš€ CSWeb Community Platform - DΓ©mocratiser CSWeb pour l'Afrique. Setup Docker en 5 min, breakout sΓ©lectif PostgreSQL, scheduler web, monitoring temps rΓ©el. 255 pages de documentation.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors