Vie Publique Sénégal is a platform dedicated to providing transparent access to public information in Senegal. This project aims to make government data and public information easily accessible to citizens.
- News Section: Access to the latest news and updates
- Official Documents: Browse through official documents, laws, and decrees
- National Assembly: Information about the National Assembly
- Council of Ministers: Access to council of ministers' communiqués
- Budget: Information about Senegal's budget
- Directory: Access to various public institutions and resources
- Elections: Information about elections
Follow us on our social networks to stay updated:
- LinkedIn - 33K followers
- Facebook - 16K followers
- Instagram - 500 followers
- Twitter/X - 14K followers
- Frontend: Nuxt 4
- UI Framework: Nuxt UI
- State Management: Pinia
- Styling: Tailwind CSS
- API: Directus
- Node.js (v18 or higher)
- npm or yarn
- Docker (for local development)
- Clone the repository:
git clone https://github.com/your-username/vie-publique-senegal.git
cd vie-publique-senegal- Install dependencies:
npm install
# or
yarn install-
Create a
.envfile based on.env.exampleand fill in the required environment variables. -
Start the development server:
For Linux/macOS:
npm run dev
# or
yarn devFor Windows PowerShell:
npm run dev-win
# or
yarn dev-winnpm run dev- Start development server (Linux/macOS)npm run dev-win- Start development server (Windows PowerShell)npm run build- Build for productionnpm run generate- Generate static projectnpm run preview- Preview production buildnpm run lint- Run ESLintnpm run lint:fix- Fix ESLint issuesnpm run format- Format code with Prettiernpm run test- Run tests with Vitestnpm run test:ui- Run tests with UInpm run test:coverage- Generate test coverage report
The project includes separate scripts for different operating systems to handle PDF worker file copying:
- Linux/macOS: Uses Unix commands (
mkdir -p,cp) - Windows: Uses PowerShell commands (
if not exist,mkdir,copy)
This project uses a strict code style to ensure consistency across the team.
When you open the project in VSCode, you'll be prompted to install recommended extensions. Click "Install All" or install them manually:
- ESLint - JavaScript/TypeScript linting
- Prettier - Code formatting
- Volar - Vue 3 support
- Tailwind CSS IntelliSense - Tailwind autocompletion
- EditorConfig - Universal editor configuration
Once extensions are installed, your code will be automatically formatted on save (Ctrl+S / Cmd+S).
- Quotes: Single quotes
'(not double quotes") - Semicolons: None (disabled)
- Indentation: 2 spaces
- Trailing commas: Always
- Line endings: Auto (LF on Unix, CRLF on Windows)
Always run before creating a commit to ensure code quality:
npm run format && npm run lint:fix.prettierrc- Prettier formatting rules.editorconfig- Universal editor settings.vscode/settings.json- VSCode-specific settingseslint.config.mjs- ESLint rules
For more details on VSCode setup, see .vscode/README.md
This project uses Vitest for unit testing with Vue Test Utils.
# Run tests in watch mode
npm run test
# Run tests with UI
npm run test:ui
# Run tests with coverage
npm run test:coverageTests are organized following Nuxt.js testing best practices in a centralized test/ directory:
test/
├── unit/ # Unit tests for composables, utils, stores
│ └── composables/
│ └── usePromesseStatus.test.ts
├── e2e/ # End-to-end tests (future)
└── nuxt/ # Nuxt runtime tests (future)
Example test:
// test/unit/composables/usePromesseStatus.test.ts
import { describe, it, expect } from 'vitest';
import { getStatusIcon } from '~/composables/usePromesseStatus';
describe('usePromesseStatus', () => {
it('should return correct icon', () => {
expect(getStatusIcon('tenue')).toBe('i-heroicons-check-circle');
});
});Coverage reports are generated in the coverage/ directory and are excluded from version control. The project is configured to send coverage data to SonarCloud for continuous code quality analysis.
This project uses SonarCloud for continuous code quality and security analysis. Code quality metrics are automatically analyzed on every push and pull request.
We welcome contributions! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.