diff --git a/ai/frontend_prompt_template.md b/ai/frontend_prompt_template.md deleted file mode 100644 index 24eb7c3..0000000 --- a/ai/frontend_prompt_template.md +++ /dev/null @@ -1,43 +0,0 @@ -# Frontend Prompt Template - -Follow the existing patterns in this codebase to: -- xxxxxxxx - -Requirements: -- xxxxx - -Process (TDD - Test Driven Development): -1. Write a test first -2. Run the test to confirm it fails -3. Implement the code to make the test pass -4. Run the test to confirm it passes -5. Repeat for each new behavior - -Code patterns to follow: -- First, explore the codebase to understand existing entity patterns -- Look at similar pages for reference -- Tests: follow existing patterns in cypress/e2e/ -- Lines should not exceed 80 columns, but should use up to 80 columns when possible — do not split lines unnecessarily -- Imports: always put imports at the top of the file -- Variable names: use explicit, descriptive names — never single-letter or abbreviated variables (e.g., use sponsorship not s, event not e) - -Git commit style: -- Present tense, imperative mood (add, create, test, fix) -- Lowercase -- Short (3-6 words) -- Match patterns found in git history - -Git commits: -- Tests should be committed first, before implementation -- One commit per file - each new file gets its own commit -- Make commits SMALL and FREQUENT - every meaningful change should be a commit -- Commits are for reviewing and documenting the development of code -- A commit can be as simple as adding one import, one getter, one property, etc. -- Don't wait to commit - commit as you go - -Branch naming: -- Use kebab-case (e.g., node-page text-page) -- Use descriptive feature names -- NEVER work directly on master - always create and work on a branch - -Do not push anything. Make commits as you go. diff --git a/app/View/ViewController.php b/app/View/ViewController.php index c131683..742b4be 100644 --- a/app/View/ViewController.php +++ b/app/View/ViewController.php @@ -29,12 +29,4 @@ class ViewController return $response; } - - public function home(Response $response): Response - { - $html = file_get_contents(__DIR__ . '/../../views/templates/home.php', true); - $response->getBody()->write($html); - - return $response; - } } diff --git a/bootstrap/app.php b/bootstrap/app.php index db0dd63..6dfce21 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -13,7 +13,6 @@ $app = Bridge::create($container); // change first param to false for production $app->addErrorMiddleware(true, true, true); -$app->get('/home', [ViewController::class, 'home']); $app->get('/admin', [ViewController::class, 'admin']); $app->get('/admin/texts', [ViewController::class, 'texts']); $app->get('/admin/texts/{textId}', [ViewController::class, 'text']); diff --git a/cypress/e2e/home.cy.js b/cypress/e2e/home.cy.js deleted file mode 100644 index d0ba1fe..0000000 --- a/cypress/e2e/home.cy.js +++ /dev/null @@ -1,20 +0,0 @@ -describe('The home page', () => { - beforeEach(() => { - cy.exec('npm run db:seed') - }) - afterEach(() => { - cy.exec('npm run db:wipe') - }) - - it('displays heading', () => { - cy.visit('/home') - cy.get('h1').should('contain', 'Home') - }) - - it('displays texts from api', () => { - cy.intercept('GET', '/api/texts').as('getTexts') - cy.visit('/home') - cy.wait('@getTexts') - cy.get('#texts-list').should('contain', 'Tanach') - }) -}) diff --git a/public/js/home.js b/public/js/home.js deleted file mode 100644 index 3e7cde8..0000000 --- a/public/js/home.js +++ /dev/null @@ -1,13 +0,0 @@ -document.addEventListener('DOMContentLoaded', () => { - const textsList = document.getElementById('texts-list'); - - async function loadTexts() { - const response = await fetch('/api/texts'); - const texts = await response.json(); - textsList.innerHTML = texts - .map(text => '
  • ' + text.name + '
  • ') - .join(''); - } - - loadTexts(); -}); diff --git a/views/templates/home.php b/views/templates/home.php deleted file mode 100644 index a386efe..0000000 --- a/views/templates/home.php +++ /dev/null @@ -1,12 +0,0 @@ - - - - Daily Goals - Home - - -

    Home

    - - - -