diff --git a/README.md b/README.md index cc606c4..67464c7 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,58 @@ # T07-Project-2 -Dette er gruppe T07 sitt repository for Prosjekt 2 i IT2810. +This is team T07's repository for Project 2 in IT2810. -## Første underveisinnlevering +## First interim delivery -Den første underveisinnleveringen beskriver konseptet for Tapfinder 2.0, -planlagt brukerflyt og foreløpig teknisk retning. Frontend, backend og -databaseskjema er under utvikling. +The first interim delivery describes the Tapfinder 2.0 concept, planned user +flow and initial technical direction. The frontend, backend and database schema +are under development. -[Les prosjektbeskrivelsen for Tapfinder 2.0 (PDF)](docs/Tapfinder%202.0.pdf) +[Read the Tapfinder 2.0 project description (PDF)](docs/Tapfinder%202.0.pdf) -## Arbeidsflyt +## Second interim delivery -`main` er beskyttet. Endringer skal gjøres på en branch og sendes inn som en -pull request. En annen deltaker i T07 må godkjenne endringen, og alle -reviewkommentarer må være løst før merge. +The second interim delivery provides a complete data flow from the published +React client through GraphQL to PostgreSQL on the team VM. The client retrieves +and displays 51 venues from the database and supports search, selection and a +detailed venue view. The application is available at: -## Backend og database + + +The GraphQL endpoint is available to the client at `/project2/api/graphql`. +The backend runs as a persistent system service and starts automatically after +the VM reboots. + +## Workflow + +`main` is protected. Changes must be made on a branch and submitted through a +pull request. Another T07 member must approve the change, and all review +comments must be resolved before merging. + +## Backend and database -Backend ligger i `server/` og bruker Node.js, TypeScript, GraphQL og PostgreSQL. -Se [server/README.md](server/README.md) for npm-oppsett, VM-konfigurasjon, -lokal testing, databasebruker og migrasjoner. PostgreSQL og den planlagte -backendtjenesten kjører direkte på VM-en; Docker brukes ikke. +The backend is located in `server/` and uses Node.js, TypeScript, GraphQL and +PostgreSQL. See [server/README.md](server/README.md) for npm setup, VM +configuration, local testing, database access and migrations. PostgreSQL and +the backend service run directly on the VM without Docker. See the +[operations documentation](ops/project2/backend/README.md) for the persistent +GraphQL service and Apache integration. See [Venue V1](docs/venue-model.md) for the shared data contract and [Geoapify data import](docs/geoapify-data-import.md) for retrieval, validation and database import. Backend checks run on pull requests alongside frontend checks. -## Frontend-deploy +## Frontend deployment -Etter at en Pull Request er godkjent og merget til `main`, kjører GitHub -Actions installasjon, Prettier, Oxlint, Vitest og Vite-build på nytt. Bare en -vellykket kjøring kan be den avgrensede deploytjenesten på T07-VM-en om å -publisere den verifiserte frontenden under: +After a pull request is approved and merged into `main`, GitHub Actions runs +installation, Prettier, Oxlint, Vitest and the Vite build again. Only a +successful run can ask the restricted deployment service on the T07 VM to +publish the verified frontend at: -Deployen bruker separate release-mapper og bytter aktiv release atomisk. -Forrige fungerende release beholdes for kontrollert rollback. Prosjekt 2 har -egen runner, deploybruker og deploynøkkel og deler ikke skriverettigheter med -Prosjekt 1. Se [ops/project2/README.md](ops/project2/README.md) for detaljer. +The deployment uses separate release directories and switches the active +release atomically. The previous working release is retained for controlled +rollback. Project 2 has a dedicated runner, deployment account and deployment +key and does not share write permissions with Project 1. See +[ops/project2/README.md](ops/project2/README.md) for details. diff --git a/docs/geoapify-data-import.md b/docs/geoapify-data-import.md index 451d483..d864cf9 100644 --- a/docs/geoapify-data-import.md +++ b/docs/geoapify-data-import.md @@ -6,7 +6,8 @@ refreshing are separate operations, rather than calls to Geoapify on every visit [Venue V1](venue-model.md) is the shared field/identity/opening-hours contract. [Backend setup](../server/README.md) explains credentials, SSH and migrations. -The frontend still uses mock places; its GraphQL integration is separate work. +The published frontend reads venues from the GraphQL API; it does not call +Geoapify directly during normal browsing. ## 1. Configure retrieval @@ -158,8 +159,8 @@ were applied, and the completed 2026-10-13 source collection was imported: Unknown hours remain `[]`, with source expressions and review reasons retained. Unknown prices, ratings, descriptions and images remain null, and app review counts start at 0. Local snapshots and the operational verification report are -kept in the ignored `server/imports/` directory. A permanent backend service and -frontend GraphQL integration remain separate work. +kept in the ignored `server/imports/` directory. The persistent backend service, +Apache proxy and frontend GraphQL integration were verified on 2026-10-16. ## Tests and remaining integration @@ -174,9 +175,9 @@ transaction rollback, repeat import and GraphQL tests against PostgreSQL in memory. No API key, VM, Docker or external test database is needed. Real-data coverage and real VM connectivity are separate operational checks. -Remaining application work includes frontend GraphQL integration with source -attribution, backend search/filter/sort/pagination, app review persistence and -scheduled refreshing after the manual workflow is verified. +Remaining application work includes backend search/filter/sort, app review +persistence and scheduled data refresh. The current venue query supports +offset/limit pagination, while filtering is performed in the frontend. Retain **Powered by Geoapify | © OpenStreetMap contributors** with imported records and show the required attribution when publishing the data. Current diff --git a/server/README.md b/server/README.md index 233076a..f6e4580 100644 --- a/server/README.md +++ b/server/README.md @@ -123,10 +123,11 @@ query { ``` `health` returns `ok`; `databaseStatus` returns `connected`. The model document -contains an example requesting all 16 fields. On the VM, `npm --prefix server -run start` runs the compiled server; a persistent backend service and automatic -backend deployment remain separate work. Frontend deployment does not deploy -these backend changes. +contains an example requesting all 16 fields. On the VM, the compiled server is +run by the persistent `t07-project2-api.service`. Apache proxies the public +`/project2/api/graphql` path to the API on `127.0.0.1:3001`. Backend releases +are prepared separately from frontend deployment; see +[`ops/project2/backend/README.md`](../ops/project2/backend/README.md). ## Seed import @@ -166,5 +167,6 @@ Codex. On 2026-10-14, both Venue migrations were applied to `tapfinder_dev` on the team VM and 51 Trondheim venues were imported. A second import inserted 0 and updated 51, preserving IDs and review values. All 16 GraphQL fields were verified against this database using the local backend resolvers through SSH. -A persistent backend service on the VM and frontend GraphQL integration remain -separate work. +On 2026-10-16, the persistent API and Apache proxy were verified end to end: +the published frontend loaded all 51 venues through GraphQL, displayed venue +details and continued to work after a full page reload.