Skip to content

x-kem0/kemoner_club

Repository files navigation

KemonerClub

Server implementation for kemoner.club

How to navigate this codebase

frontend is purely stateless and depends on backend for data storage and retrieval, as well as user session data.

Database schemas may be found in apps/backend/lib/database/*.ex
The actual migrations may be found in apps/backend/priv/repo/migrations/*.exs

Most HTML templates outside of the live editor are stored in apps/frontend/lib/frontend_web/controllers/page_html

Any login/authentication related code is stored in apps/frontend/lib/frontend_web/controllers/auth_*

Any RSS related code is stored in apps/frontend/lib/frontend_web/controllers/rss_controller.ex

The editor template and code is stored in apps/frontend_web/live/

All site endpoints may be found in apps/frontend_web/router.ex

Static files are stored in apps/frontend_web/priv/static

Running a development instance

First steps

  • Ensure that you have both Elixir and Erlang fully installed
  • Clone this repo and navigate to the folder
  • Run mix deps.get to fetch necessary dependencies

Configuring Postgresql for dev

Note: This is not acceptable practice in production

  • Install postgresql and start the service

  • Create a new superuser named kemoner_club using psql:

CREATE USER kemoner_club WITH PASSWORD 'kemoner_club';
ALTER USER kemoner_club WITH SUPERUSER;

Alternatively, use the built-in postgres user and adjust config/dev.exs accordingly.

  • Run ./initialize.sh in the kemoner_club folder to start the database and perform necessary migrations.
    This may also be run to restart the state of the database at any time during development.

Running the server

  • Run iex -S mix phx.server to start an IEX shell and run the server
  • The server can be found at http://localhost:4000/
  • Authentication emails can be found at http://localhost:4000/dev/mailbox
  • To help with development, some functions have been added to iex:
    • create_user(email_address): Adds a user with a given email address. In a development environment, this really can be anything at all.
      No email will actually be sent except to the dev mailbox.

Running a production instance

Production instances should only be run as fully compiled mix releases. More to come on this.

About

Server implementation for kemoner.club

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published