pmdb

module
v0.0.0-...-b4bf89c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: MIT

README

PMDb

PMDb banner

Personal Movie Database

PMDb is your personal space for movies! Here you can rate and review movies you watched and make watchlists for movies you want to watch.

Getting Started

Installation

To get a local environment for this project, you need to have the following installed:

You also need to set up a Turso database.

Usage

After cloning the repo, setting up a database, and installing all dependencies:

  • Copy the contents of .env.example into .env then supply DBURL and DBTOKEN according to your database instance
cp ~/.env.example .env
  • Execute the database migrations via Goose in the ./sql/schema directory
goose turso "libsql://[DATABASE].turso.io?authToken=[TOKEN]" up
  • Compile the Tailwind CSS by running the tw-build NPM script. If you want to run the Tailwind watcher, you'll have to run the tw-watch script in a separate terminal.
npm run tw-build
  • Run air (at the project root) which will compile and auto-reload the Go server and Templ components.
air

Tech Stack

Technologies:
  • Go: backend
  • Templ: templating
  • TailwindCSS: styling Go templates
  • HTMX: UI interactivity
  • Turso: database
  • Goose: SQL migration tool
  • SQLC: SQL-to-Go code generation tool
  • Air: live reloading
External resources:
Architectural Design

The backend is built as a set of loosely coupled services as displayed in this chart.

chart

Contributing

This project is still a work in progress and mainly for learning purposes, so for now I only accept issues for pointing out bugs or feature suggestions. Thanks!

Directories

Path Synopsis
cmd
pmdb
package main is the entry point of the PMDb app
package main is the entry point of the PMDb app
internal
auth
Package auth defines the service used for user authentication/authorization and management, including related routes, handlers, and templates.
Package auth defines the service used for user authentication/authorization and management, including related routes, handlers, and templates.
errors
templ: version: v0.2.680
templ: version: v0.2.680
home
Package home defines the service used for the home page, including related routes, handlers, and templates.
Package home defines the service used for the home page, including related routes, handlers, and templates.
logger
Package logger holds tooling for logging
Package logger holds tooling for logging
movies
templ: version: v0.2.680
templ: version: v0.2.680
nowplaying
Package nowplaying defines the service used for the now playing page, including related routes, handlers, and templates.
Package nowplaying defines the service used for the now playing page, including related routes, handlers, and templates.
reviews
Package reviews defines the service used for the movies and reviews pages and logic, including related routes, handlers, and templates.
Package reviews defines the service used for the movies and reviews pages and logic, including related routes, handlers, and templates.
templs
templ: version: v0.2.680
templ: version: v0.2.680
tmdbapi
Package tmdbapi defines the service used for interacting with the TMDB API for retrieving movie data.
Package tmdbapi defines the service used for interacting with the TMDB API for retrieving movie data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL