Skip to content

A self-hosted journal web app using the Phoenix framework and a PostgreSQL database.

Notifications You must be signed in to change notification settings

Sank6/Journal-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Journal App

A self-hosted journal web app using the Phoenix framework and a PostgreSQL database. The images are from Unsplash's API.

The images from the screenshots above are by setsj

Setup

You need nodejs, elixir, the Phoenix framework and a Postgres server.

  • Clone the repo
  • Edit config/config.exs with an unsplash access key and database details.
  • Install the dependencies with mix deps.get.
  • Create and migrate your database with mix ecto.setup.
  • Install Node.js dependencies with npm install inside the assets directory.
  • Start Phoenix endpoint with mix phx.server.

Production

Full documentation at the phoenix guide.

  • Generate a secret key base with mix phx.gen.secret and export it with export SECRET_KEY_BASE=REALLY_LONG_SECRET
  • Export the database url with export DATABASE_URL=ecto://USER:PASS@HOST/database
# Compile
mix deps.get --only prod
MIX_ENV=prod mix compile
npm run deploy --prefix ./assets
mix phx.digest

# Migrate if necessary
MIX_ENV=prod mix ecto.migrate

# Run in detached mode
PORT=4001 MIX_ENV=prod elixir --erl "-detached" -S mix phx.server

To Do

  • Encrypt entries with a password.
  • Export to pdf.
  • Create an offline page for PWA.
  • Light mode / Dark mode switcher

About

A self-hosted journal web app using the Phoenix framework and a PostgreSQL database.

Topics

Resources

Stars

Watchers

Forks