Skip to content

henryfoster/flash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Coverage

Flash - Intelligent Spaced Repetition Learning Platform

Flash is a fast and straight forward to use flash card learning app using the SM2 Spaced repetition algorithm or just crunch cards nonstop with the simple power learning mode. Cards are created using a markdown editor that also supports uploading images per drag and drop. The app comes with an MCP server to let your favourite AI create cards for you. Also web push is supported to send push notifications to the browser even if the page is not open.

Project Status

Active development - production deployment guide coming soon

demo screenshot

Core Features

Tech Stack

  • Backend: PHP 8.4, Symfony 7.2, PostgreSQL
  • Frontend: TailwindCSS, Stimulus, Turbo
  • Infrastructure: Docker, FrankenPHP
  • Quality: PHPStan Level 8, PHPUnit, 80%+ test coverage
  • Integrations: MCP Protocol, Web Push API

Getting started

Run server

docker compose build --no-cache
docker compose up --pull always -d --wait

With https

docker compose up -d

With http

SERVER_NAME=:80 docker compose up -d

Create User

docker compose exec -T php bin/console app:user:create <email> <password>

MCP Usage

  1. Generate a token at: https://localhost/user/profile
  2. add mcp endpoint to AI client that supports mcp over http: https://localhost/mcp
    Request: POST
    Header: Authorization: Bearer <your token>
    Body:
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_flashcards",
    "arguments": {
      "deck": "php",
      "cards": [
        {
          "front": "What does array_map do?",
          "back": "Applies a callback to each array element and returns new array"
        },
        {
          "front": "Difference between include and require?",
          "back": "require throws fatal error if file not found, include only warning"
        },
        {
          "front": "What is a trait in PHP?",
          "back": "A mechanism for code reuse in single inheritance languages"
        }
      ]
    }
  }
}

Development

Debugging

With XDebug enabled

XDEBUG_MODE=debug docker compose up -d

Testing

Run tests

docker compose exec -T php bin/console -e test doctrine:database:create
docker compose exec -T php bin/console -e test doctrine:migrations:migrate --no-interaction
docker compose exec -T php bin/phpunit

Test coverage reports

HTML coverage

docker compose exec -e XDEBUG_MODE=coverage -T php bin/phpunit --coverage-html ./coverage-report

XML coverage

docker compose exec -e XDEBUG_MODE=coverage -T php bin/phpunit --coverage-clover clover.xml

Code Quality

Static analysis

docker compose exec -T php vendor/bin/phpstan analyse src --memory-limit=-1

Code formatting (dry-run)

docker compose exec -T -e PHP_CS_FIXER_IGNORE_ENV=true php ./vendor/bin/php-cs-fixer fix src --dry-run

Automated refactoring (dry-run)

docker compose exec -T php ./vendor/bin/rector src --dry-run

Frontend Development

Watch mode

bin/console tailwind:build --watch

Production build

php bin/console tailwind:build --minify
php bin/console asset-map:compile

Acknowledgments

This project was bootstrapped using dunglas/symfony-docker. Thanks to Kévin Dunglas and contributors for the excellent Docker setup.

License

MIT

About

A flash card web application build with Symfony.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published