Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

[WIP] add support for exported static site builds #169

Draft
wants to merge 53 commits into
base: master
Choose a base branch
from

Conversation

pavelskipenes
Copy link
Collaborator

@pavelskipenes pavelskipenes commented Jan 26, 2023

The main purpose of this PR is to simplify the project and make it more maintainable. It splits the project into front end and backend more clearly. Also this PR will add support for any front end framework that is capable of exporting it's build as a static site. And even other applications would be able to take advantage of the API if they would want that.

@Sigevio is working on an alternative front end in next.js

Planned progress:

  • remove all legacy fronend code
  • refactor all php code to be only (or mostly) an api endpoint
  • complete API endpoints
    • member
    • users
    • webstore / product
    • auth
    • charge
    • cin (cin is is not consistent between years so that functionality is useless)
  • add support for exported builds of static sites
  • remove "features" and "easter eggs" that are almost never used.

It would be relevant to rename this repository to "swimming-website-backend" after successful merge.

Closes issues closes #3 closes #4 closes #29 closes #32 closes #33 closes #106 closes #117 closes #136 closes #157 closes #158 closes #68 maybe even more...

- transform global settings var into a singleton class
- add input validation to settings
- add type hinted getters for settings class
- translator will no longer load the same translation file more than
once
- argsURL function will now return NULL instead of empty string
- global settings variable now removed
- relative includes
- fix vendor include errors
- add debug info to api output if DEBUG env is set to a truthy value
- api output no longer escapes forward slashes making paths easier to read
- id refactor:
`$id` member of each DTO class will retain it's name to reflect DB
structure. Remote indexes are prefixed with table name in camel case. eg:
`$userId`, `$productId`, `$cinId` and so on. All extracted id's are also
prefixed with their table name unless they are dumped to client. eg:
`$userId = $user->id;` ~~`$id = $user->id;`~~

- fix minor typo that would not send a correct password to newly created
users.
- remove a dead function
- add router class
- refactor exception handling in routes
- remove globals
- add initial slack integration: log craches to slack
- add tests
- add robots.txt and .well-known/security.txt
- handle 403 as 404
- use frontend 404 code
- allow direct access to all files in public dir
Add a test member endpoint. written in Python just to make it quick.
Might want to transitions it to phpunit or some other php framework
later on when the api is finalized.
@pavelskipenes pavelskipenes changed the title [WIP] add support for exported static site build [WIP] add support for exported static site builds Jan 26, 2023
@pavelskipenes pavelskipenes self-assigned this Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.