Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Tychobra/ambiorix-app-template
Live App
https://github.com/Tychobra/ambiorix-app-template
Last synced: 28 days ago
JSON representation
Live App
- Host: GitHub
- URL: https://github.com/Tychobra/ambiorix-app-template
- Owner: Tychobra
- Created: 2024-01-29T15:58:03.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-01-29T20:51:31.000Z (10 months ago)
- Last Synced: 2024-01-30T19:15:49.909Z (10 months ago)
- Language: JavaScript
- Homepage: https://ambiorix-app-template-kzedhk4g2a-ue.a.run.app
- Size: 120 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - Tychobra/ambiorix-app-template - Live App (JavaScript)
README
# Ambiorix Web App Template
### [Live App](https://ambiorix-app-template-kzedhk4g2a-ue.a.run.app)
A starter template for building web apps with an R [Ambiorix](https://ambiorix.dev/docs/ambiorix) backend,
Postgres Database, and [Solidjs](https://www.solidjs.com/) frontend.This starter app comes with email link authentication. Users can sign up or login with an email
and a link will be sent to their email address to authenticate them. This method of authentication
does not require a password. We use [Mailgun](https://www.mailgun.com/) to send the emails.The app comes with an admin panel for managing users. The admin panel can be extended to handle any
other admin tasks.### Install JS Dependencies
```terminal
npm install
cd frontend_src && npm install
cd ..
```### Configure Database and Mailgun Credentials
Create a file named "/app/.env.development" with your database and mailgun credentials. The file
should look like this:```.env.development
DB_HOST=""
DB_USER=""
DB_PASSWORD=""
DB_NAME=""MAILGUN_URL=""
MAILGUN_API_KEY=""
APP_URL="http://localhost:8080" # or whatever your app url is
```### Initialize Database
The following R script will create the database and tables to handle user authentication.
```R
source("data_prep/db_init.R")
```### Run Locally for Development
```terminal
npm run dev
```### Build for Production
```terminal
npm run prod
docker build -t ambiorix-app-template .docker run -p 8080:8080 ambiorix-app-template
```### Deploy to Google Cloud Run (or anywhere else)
```terminal
# tag image for deployment to GCR (Google Container Registry)
docker tag ambiorix-app-template gcr.io/postgres-db-189513/ambiorix-app-template# push tagged image to GCR
docker push gcr.io/postgres-db-189513/ambiorix-app-template
```