Skip to content

adam-zakaria/fluent

Repository files navigation

Run

Local

npm run dev Loads .env and .env.development

AWS

see deploy_all.sh

Notes

npm run dev:aws_dev calls from package.json``"dev:aws_dev": "vite --mode aws_dev". vite.config.js does things based on mode, i.e. set hot reload for dev but not prod hmr: mode === 'aws_dev', // Enable HMR only in 'aws_dev' mode

Hosting

We used route53, gandi and nginx. We took the route53 nameservers and added it to the gandi dashboard (I think). We added a policy to the IAM user 'adam' (route53_fluent), to allow some route53 CRUD. Generated certs with certbot and added it to flask. Redirected 80 to 5173 in nginx.

Certs

List certs: sudo certbot certificates

Nginx is configured to forward http to https, and it is working.

Nginx and the .env's needed to be updated for the backend to be https. Look at /etc/nginx/nginx.conf and .env for more.

Export api key

Update this path. Export GOOGLE_APPLICATION_CREDENTIALS="/Users/azakaria/Code/polyglot_old/backend/helical-glass-264223-7cb954d1e0b4.json"

If the translation randomly stops working, confirm GOOGLE_APPLICATION_CREDENTIALS is set to the correct key.

export GOOGLE_APPLICATION_CREDENTIALS="/home/ubuntu/Code/fluent/key.json"

Schema Conversion

Schema

{ english: { 'great': {'spanish': 'grande', 'french': 'grand', 'japanese': {'non_roman': '偉大な', 'roman': 'iie'}} }, }

This seems fine. { english: { 'great': {'spanish': {'roman':'grande', 'non_roman': ''}, 'french': {'roman': 'grand', 'non_roman': ''}, 'japanese': {'non_roman': '偉大な', 'roman': 'iie'}} }, } This also requires changes to the localstorage? Which is a pain? ummmm localstorage is just html...so maybe not. Actually it's not :) It's a list of lists [['english','spanish','french'],['hello', 'hola', 'bonjour']]

Depending on checkbox, render roman or not.

A new top level key gets added for source langs in other langs (we know english so we translate from english.)

Not sure how to do the tts audio files. Maybe a separate file?

{ english: { 'great': 'audio/great.mp3', 'hello': 'audio/hello.mp3' }, spanish: 'rojo': 'audio/rojo.mp3', 'hola': 'audio/hola.mp3' }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published