A modern web application for managing and visualizing citations from Episciences publications. The software enables automated extraction, processing, and management of bibliographic references from scientific documents.
Developed by the Center for Direct Scientific Communication (CCSD).
- Features
- Tech Stack
- Requirements
- Installation
- Configuration
- Development
- Project Structure
- API Documentation
- Testing
- Deployment
- Contributing
- License
- Automated Citation Extraction: Extract bibliographic references from PDF documents using GROBID
- Multiple Import Sources: Support for manual entry, BibTeX import, and Semantic Scholar integration
- Reference Management: Add, edit, validate, and organize citations
- Multi-language Support: Interface available in English and French
- Export Capabilities: Export citations in various formats
- User Authentication: Secure CAS-based authentication system
- Modern UI: Responsive interface built with Tailwind CSS
Backend:
- PHP 8.2+
- Symfony 6.4
- Doctrine ORM
- MySQL/MariaDB
Frontend:
- Tailwind CSS 3.2.7
- Stimulus (Hotwired)
- Webpack Encore
- FontAwesome 6.4.0
External Services:
- GROBID (for PDF citation extraction)
- Semantic Scholar API
- CAS Authentication
- PHP 8.2 or higher
- Composer
- Node.js 16+ and npm/yarn
- MySQL 5.7+ or MariaDB 10.3+
- Docker & Docker Compose (for containerized setup)
-
Clone the repository
git clone https://github.com/CCSDForge/episciences-citations.git cd episciences-citations -
Configure environment
cp .env .env.local # Edit .env.local with your configuration -
Start Docker containers
docker-compose up -d
-
Install dependencies
docker exec epi-citations-php-fpm composer install docker exec epi-citations-php-fpm npm install
-
Run database migrations
docker exec epi-citations-php-fpm php bin/console doctrine:migrations:migrate --no-interaction -
Build frontend assets
docker exec epi-citations-php-fpm npm run build -
Access the application
- Application: https://localhost (or your configured domain)
- Assets are automatically compiled in Docker environment
-
Clone the repository
git clone https://github.com/CCSDForge/episciences-citations.git cd episciences-citations -
Install PHP dependencies
composer install
-
Install JavaScript dependencies
npm install
-
Configure environment
cp .env .env.local
Edit
.env.localand configure:DATABASE_URL: Your database connection stringAPP_ENV:devorprodAPP_SECRET: Generate a secure random string- External service URLs (GROBID, Semantic Scholar, etc.)
-
Create database and run migrations
php bin/console doctrine:database:create php bin/console doctrine:migrations:migrate
-
Build assets
npm run dev # Development mode # or npm run build # Production mode
-
Start development server
symfony server:start # or php -S localhost:8000 -t public/
Key configuration variables in .env.local:
# Application
APP_ENV=dev
APP_SECRET=your-secret-key-here
# Database
DATABASE_URL="mysql://user:password@127.0.0.1:3306/episciences_citations?serverVersion=8.0"
# External Services
GROBID_URL=http://grobid-server:8070
SEMANTIC_SCHOLAR_API_URL=https://api.semanticscholar.org/
# CAS Authentication
CAS_SERVER_URL=your-cas-server-url
CAS_SERVICE_URL=your-service-urlFor production deployment, configure your web server to point to the public/ directory.
Apache VirtualHost example:
<VirtualHost *:80>
ServerName episciences-citations.example.com
DocumentRoot /path/to/episciences-citations/public
<Directory /path/to/episciences-citations/public>
AllowOverride All
Require all granted
</Directory>
</VirtualHost># Frontend development
npm run dev # Build assets for development
npm run watch # Watch and rebuild on changes
npm run build # Build assets for production
# Backend development
php bin/console cache:clear # Clear cache
php bin/console doctrine:migrations:diff # Generate new migration
php bin/console doctrine:schema:validate # Validate database schema
# Code quality
composer install --dev # Install dev dependencies
vendor/bin/phpunit # Run tests- PHP: Follow Symfony coding standards (PSR-12)
- JavaScript: ES6+ syntax with Stimulus controllers
- CSS: Tailwind utility-first approach with custom components
episciences-citations/
├── assets/ # Frontend assets
│ ├── controllers/ # Stimulus controllers
│ ├── js/ # JavaScript files
│ └── styles/ # CSS/Tailwind files
├── config/ # Symfony configuration
├── docker/ # Docker configuration files
├── migrations/ # Database migrations
├── public/ # Web server document root
├── src/
│ ├── Command/ # Console commands
│ ├── Controller/ # HTTP controllers
│ ├── Entity/ # Doctrine entities
│ ├── Repository/ # Doctrine repositories
│ ├── Service/ # Business logic services
│ └── Twig/ # Twig extensions
├── templates/ # Twig templates
├── tests/ # PHPUnit tests
├── translations/ # i18n files (EN/FR)
└── var/ # Cache, logs, sessions
The application provides both a web interface and API endpoints:
- Web Interface:
/- Main application interface - View References:
/en/viewref/{docId}or/fr/viewref/{docId} - Public API: Various endpoints for citation retrieval and management
For detailed API documentation, refer to the controller annotations in src/Controller/.
# Run all tests
php bin/phpunit
# Run specific test suite
php bin/phpunit tests/Unit/
# Run with coverage
php bin/phpunit --coverage-html var/coverage-
Install dependencies (production mode)
composer install --no-dev --optimize-autoloader npm install --production
-
Build assets
npm run build
-
Set environment to production
APP_ENV=prod
-
Clear and warm up cache
php bin/console cache:clear --env=prod php bin/console cache:warmup --env=prod
-
Run migrations
php bin/console doctrine:migrations:migrate --no-interaction
-
Set proper permissions
chown -R www-data:www-data var/
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
For issues, questions, or contributions:
Developed by CCSD