Shay is a modern RSS reader built with Angular and Symfony.
Follow these steps in order to set up the development environment:
git clone https://github.com/chemel/shay-backend.git
cd shay-backendInstall PHP dependencies using Composer:
composer installLaunch the required Docker containers:
docker compose up -dExecute the following commands to set up and populate the database:
# Create the database
php bin/console doctrine:database:create
# Update database schema
php bin/console doctrine:schema:update --force
# Load initial data fixtures
php bin/console doctrine:fixtures:load
# Fetch initial RSS feeds
php bin/console app:feed:fetch
# Create a user account
php bin/console app:user-createGenerate JWT keypair for authentication:
php bin/console lexik:jwt:generate-keypairLaunch the Symfony development server:
symfony serveThe application should now be running at http://localhost:8000
- Make sure you have PHP 8.x installed
- Docker and Docker Compose must be installed on your system
- Composer is required for dependency management
- The Symfony CLI should be installed for the development server
You can use the following curl commands to test the API endpoints:
To obtain a JWT token:
curl -s -X POST \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{"username":"admin","password":"admin"}' \
http://127.0.0.1:8000/api/loginNote: Replace admin/admin with your actual credentials.
To fetch the list of feeds (authenticated request):
curl -H 'Accept: application/json' \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
http://127.0.0.1:8000/api/feedsNote: Replace YOUR_JWT_TOKEN with the token received from the authentication request.