Compare commits

...

13 Commits

Author SHA1 Message Date
Alex Tavarez
d6256dfa18 Added some further clarification, added an unfinished section 2025-09-07 14:23:52 -04:00
Alex Tavarez
acc2106e67 Added tasks related to project structure changes and new pages, reordered tasks 2025-09-07 14:19:57 -04:00
Alex Tavarez
08850f4d82 Added another task set, this time planning for an extra page 2025-09-07 13:52:21 -04:00
Alex Tavarez
d17e421618 Updated to reflect current tasks 2025-09-07 00:20:41 -04:00
Alex Tavarez
56ce939843 Improved clarity by removing or refactoring disruptive paragraph or sidenote 2025-09-06 23:35:00 -04:00
Alex Tavarez
30a9f4cc82 Fixed typo 2025-09-06 23:31:57 -04:00
Alex Tavarez
3764fdcf99 Added note about idiomatic Elixir 2025-09-06 23:30:26 -04:00
Alex Tavarez
916584dfe9 Fixed typo 2025-09-06 23:23:00 -04:00
Alex Tavarez
681854dc58 Added more imperative language to instructional headers 2025-09-06 23:22:19 -04:00
Alex Tavarez
f02c0777c1 Fixed typo 2025-09-06 23:20:14 -04:00
Alex Tavarez
9189ba54cc Improved clarity 2025-09-06 23:17:49 -04:00
Alex Tavarez
b5a96c7940 Changed hypothetical shell variable to futureproof documentation, removed link to gitignored image 2025-09-06 23:14:59 -04:00
Alex Tavarez
e8232ee713 Changed and expanded upon default README supplied by 'mix phx.new' command 2025-09-06 23:10:00 -04:00
2 changed files with 79 additions and 15 deletions

View File

@@ -1,18 +1,63 @@
# Sukaato # Sukaato
To start your Phoenix server: This repository is to define a backend for, and to serve, my website. The code here is building upon the basis of a project structure and associated source code supplied by the [Elxir](https://elixir-lang.org/) [Phoenix](https://hexdocs.pm/phoenix/installation.html) web framework package(s)/module(s) and the associated CLI utilities.
* Run `mix setup` to install and setup dependencies > [!NOTE]
* Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server` > Not only is this a WIP, but this project is the first time I've ever used the Elixir programming language. As of yet, the source code is not written idiomatically.
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser. ## Execution and installation
Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html). There are a collection of procedures to follow for proper execution and installation of this server and its website. This is a highly abstract, simplified summary of the execution and installation processes. The plan is to provide more detailed exposition and more precise articulation of the execution and installation processes as the project itself is developed, as some other packages, software tools, or scripts that may be introduced may change the needed detail or precision herein. Some design approaches, structure specifications, and so on, may also have yet to be finalized.
### Prerequisitess for Execution or Installation
#### Configure `site.toml`
Make sure to configure things like the website's name, author, etc., via the `${SUKAATO_SITE_SOURCE_ROOT}/site.toml` file.
#### Supply Resources to Themes
Make sure that subdirectories under path `${SUKAATO_SITE_SOURCE_ROOT}/priv/static/` are appropriately populated. Either follow the active/enabled theme's CSS/SASS path references, or change such path references to match custom `${SUKAATO_SITE_SOURCE_ROOT}/priv/static` prefixed filepaths.
References to paths in CSS/SASS file should be absolute paths, insofar as their root is known and is `${SUKAATO_SITE_SOURCE_ROOT}/priv/static`. That is, they are relative to the aforementioned path, but not relative to the CSS/SASS file being currently edited.
> [!WARNING]
> The paths referenced in CSS/SASS files recursively under `${SUKAATO_SITE_SOURCE_ROOT}/assets/sass/` or `${SUKAATO_SITE_SOURCE_ROOT}/assets/css/` are relative to `${SUKAATO_SITE_SOURCE_ROOT}/priv/static` and not each such CSS/SASS file currently being edited. This is UNLESS subdirectories of `${SUKAATO_SITE_SOURCE_ROOT}/priv/static/` [have not been marked as external for/to `:esbuild` in `${SUKAATO_SITE_SOURCE_ROOT}/config/config.exs`](https://hexdocs.pm/phoenix/asset_management.html#images-fonts-and-external-files); in that case, the given filepaths will never be found anyway.
SASS files can be found under path `${SUKAATO_SITE_SOURCE_ROOT}/assets/sass/themes/**/`, while CSS files can be found under path `${SUKAATO_SITE_SOURCE_ROOT}/assets/css/`.
> [!TIP]
> Avoid editing file `app.css` under `${SUKAATO_SITE_SOURCE_ROOT}/assets/css/` path directly. Edit SASS files under `${SUKAATO_SITE_SOURCE_ROOT}/assets/sass/themes/${theme_name}/` wherein `$theme_name` corresponds to name of enabled/active website theme. The aforementioned `app.css` file should be the final output starting from the preprocessing of SASS files recursively found under any subdirectory at `${SUKAATO_SITE_SOURCE_ROOT}/assets/sass/themes/`. Which subdirectory's SASS files are to be preprocessed as CSS is based on the relative imports in a symbolic link, `app.sass`, directly under `${SUKAATO_SITE_SOURCE_ROOT}/assets/sass/themes/`. This symbolic link should be to an `export.sass` file found directly under `${SUKAATO_SITE_SOURCE_ROOT}/assets/sass/themes/${theme_name}/` corresponding to the active/enabled website theme.
The website has a default theme supplied, but you are welcome to make your own. Website theme can be changed by assigning a value to `theme` in `${SUKAATO_SITE_SOURCE_ROOT}/site.toml`, so set it there once made.
> [!TIP]
> Make sure that all renderable stylesheet paths for files under `${SUKAATO_SITE_SOURCE_ROOT}/lib/sukaato_web/controllers/page_*/` are set to `/assets/app.css`, or a path relative to `${SUKAATO_SITE_SOURCE_ROOT}/priv/static` that has been made external (whether the directory exists yet or not) for/to `:esbuild`. Again, see about [asset management in Phoenix web framework](https://hexdocs.pm/phoenix/asset_management.html#images-fonts-and-external-files).
#### Supply Resources for Pages
> **TBC**
> This section is unfinished. Check back later.
### Run the project's server
This project was built using the Phoenix web framework. To start the Phoenix server:
* Place SSL/TLS certificates in/under path `/priv/cert`
* Make sure `config.exs`, `dev.exs`, or `prod.exs` [reflect the paths to these certificates](https://hexdocs.pm/phoenix/using_ssl.html)
* Run `mix setup` while at project root to install and setup dependencies
* Start Phoenix endpoint while at project root with `mix phx.server` or inside IEx with `iex -S mix phx.server`
Now you can visit [`localhost:4001`](https://localhost:4001) from your browser.
### Run this project in production
Ready to run in production? Please [check Phoenix web framework's deployment guides](https://hexdocs.pm/phoenix/deployment.html).
## Learn more ## Learn more
* Official website: https://www.phoenixframework.org/ * [More on the Phoenix web framework](https://www.phoenixframework.org/)
* Guides: https://hexdocs.pm/phoenix/overview.html * [Phoenix web framework guide](https://hexdocs.pm/phoenix/overview.html)
* Docs: https://hexdocs.pm/phoenix * [Phoenix web framework documentation](https://hexdocs.pm/phoenix)
* Forum: https://elixirforum.com/c/phoenix-forum * [Phoenix web framework forum](https://elixirforum.com/c/phoenix-forum)
* Source: https://github.com/phoenixframework/phoenix * [Phoenix web framework source repository](https://github.com/phoenixframework/phoenix)

View File

@@ -2,8 +2,27 @@
#+email: ajt95@prole.biz #+email: ajt95@prole.biz
#+language: en #+language: en
* TODO [#A] Add view render file under `lib/sukaato_web/controllers` and template files under `lib/sukaato_web/controllers/*_html/` :feature: * PLANNED
** TODO [#A] Move ".php" extension pages and associated assets from original website project's `public` directory to `lib/sukaato_web/controllers/page_html` ** TODO [#A] Move Markdown and JSON files used by HEEx pages to new directories ~${SUKAATO_SITE_SOURCE_ROOT}/priv/static/{md,json}~
** TODO [#A] Remove or substitute PHP in ".php" extension pages with HEEX variables - May require editing some paths in file ~${SUKAATO_SITE_SOURCE_ROOT}/lib/sukaato_web/marker.ex~
** TODO [#A] Change file extension of ".php" extension pages to ".html.heex" - May require marking the new paths relative to ~${SUKAATO_SITE_SOURCE_ROOT}/priv/static~ as external to/for ~:esbuild~ in ~${SUKAATO_SITE_SOURCE_ROOT}/config/config.exs~ (see [[https://hexdocs.pm/phoenix/asset_management.html#images-fonts-and-external-files][asset management in Phoenix web framework]])
** TODO [#A] Define HEEX variables in template files under `lib/sukaato_web/controllers/*_html/` wherever appropriate, starting directly in the related function in the view render file ** TODO [#A] Add JSON file containing object list for favorite albums, named "albums.json"
*** TODO [#A] Add equivalently structured Elixir default object list in file ~${SUKAATO_SITE_SOURCE_ROOT}/lib/sukaato_web/controllers/page_controller.ex~, using an Elixir struct data type declared in ~${SUKAATO_SITE_SOURCE_ROOT}/lib/sukaato_web/controllers/web_types.ex~
*** TODO [#A] Add a HEEx file (with existing route and controller / view function) in ~${SUKAATO_SITE_SOURCE_ROOT}/lib/sukaato_web/controllers/page_html/~ with the same base filename (i.e., "albums.html.heex")
** TODO [#A] Add profile and account management page, visible after login to website
** TODO [#A] Add page/iframe or page element for drafting, publishing and editing blogposts, visible after login to website
- May require use of Phoenix LiveView
** TODO [#A] Implement ability for ~SukaatoWeb.Marker~ module in ~${SUKAATO_SITE_SOURCE_ROOT}/lib/sukaato_web/marker.ex~ to parse/render markdown posts or posts in database
*** TODO [#A] Add page for feed of blogposts and for individual posts
**** TODO [#B] Implement RSS feed for blogpost feed
** TODO [#C] Add a page for favorite music albums
** TODO [#C] Create or implement APIs for broader administrative capabilities
- May require use of Phoenix LiveView
** TODO [#A] Implement passkey login authentication flow "thread" to website
** TODO [#B] Add basic admin dashboard containing essentials, visible after admin login to website
- Should contain announcement publishing
- Should contain user managing
* IN PROGRESS
* FINISHED