SvelteKit-PocketBase-Web-App-with-OAuth2---Dockerized Svelte Themes

Sveltekit Pocketbase Web App With Oauth2 Dockerized

This repository contains a Dockerized SvelteKit and PocketBase web application with a simple OAuth2 authentication system. The project leverages Docker Compose to easily set up and manage the entire development environment.

SvelteKit-PocketBase-Web-App-with-OAuth2---Dockerized

Overview

This repository contains a Dockerized SvelteKit and PocketBase web application with a simple OAuth2 authentication system. The project leverages Docker Compose to easily set up and manage the entire development environment.

Technologies Used

  • Frontend: SvelteKit
  • Backend: PocketBase
  • Containerization: Docker

Getting Started

Prerequisites: Docker Desktop (should come with docker compose)

  1. Clone the repository:

    git clone https://github.com/PDelos/SvelteKit-PocketBase-Web-App-with-OAuth2---Dockerized.git
    cd Datathon_Web
    
  2. Build and start the Docker containers:

    docker-compose up --build
    

Running the Application

Using PocketBase

Data is stored in pb_data. Access PocketBase admin UI at http://localhost:8090/_/.

OAuth2 Setup

To properly configure OAuth2 providers, ensure the following:

  1. Set the Redirect URI: In your OAuth2 provider's settings, set the redirect URI to:

    http://localhost:5173/login
    
  2. Add Client ID and Client Secret: In the PocketBase admin dashboard:

    • Navigate to the OAuth2 providers section.
    • Add your Client ID and Client Secret provided by your OAuth2 provider.

Commands to Dockerize Development Environment

  • Run the .bat / .sh scripts to deploy or destroy all the containers.
  • If having problems with Docker, make sure all volumes, images, and containers related to this repo are deleted before running Docker commands.
  • To enter inside a container through a terminal, use:
    docker exec -it sveltekit /bin/sh
    docker exec -it pocketbase /bin/sh
    

Additional Resources

Top categories

Loading Svelte Themes