Skip to content

ambuda-org/ambuda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unit Tests

Ambuda

A breakthrough Sanskrit library

Ambuda is an online Sanskrit library. This repository contains Ambuda's core code, and this README will show you how to build and change it.

Contents

Quickstart

This quickstart will show you how to:

  • start Ambuda with Docker
  • create an admin user
  • upload content to the site

Starting Ambuda with Docker

The quickest way to run Ambuda on your computer is to use docker compose from your command line.

Tip

You can install docker compose through either the Docker website or your favorite package manager. If you have a Unix machine and don't like Docker Desktop, we recommend Colima.

Once you have docker configured, starting the site is simple:

make ambuda-dev

This command will do the following:

  • Build an Ambuda Docker image. This will likely take a few minutes the first time it runs, but it will be substantially faster on subsequent runs.

  • Start Ambuda's main services: the web server, a Celery pool for background tasks, and Redis for Celery interop.

  • Initialize a Sqlite database with sample data. Data is persisted to the data/ directory and survives across restarts.

  • Set up hot reloading for Python, CSS, and JavaScript.

  • Start the web server at http://localhost:5000.

To quit, press Ctrl+C to stop all services.

Tip

If you ever run into build issues with make ambuda-dev, first run make ambuda-dev-rebuild then try again.

Creating an admin user

Once the Docker service is up, create an admin user so that you can log in:

make ambuda-dev-shell

# Inside the shell

# This command creates a new user.
> uv run cli.py create-user

# This command assigns the `admin` role to your new user.
> uv run cli.py add-role --username <your-username> --role admin

After you've created your admin user, go to http://localhost:5000/sign-in to sign in.

Uploading content to the site

(Under revision.)

Once you've logged in as an admin user go to https://localhost:5000/admin/ to open the Admin UI.

Architecture

(Under revision.)

Essentials:

  • Web backend: Flask
  • Task runner: Celery, with a Redis message broker.
  • Frontend: Alpine.js and small amounts of Typescript.
  • Storage: S3

Documentation

(Under revision.)

Contributing

For details on how to contribute to Ambuda, see CONTRIBUTING.md. We also strongly recommend joining our Discord channel, where we have an ongoing informal discussion about Ambuda's technical problems and roadmap.

About

Main application code for Ambuda, a breakthrough Sanskrit library (ambuda.org)

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 10