latticesurgery-com/lattice-surgery-compiler

Make Website Static

Closed this issue · 3 comments

Hosting the website statically as pure HTML/CSS/JS removes the complexity of Python/Django/CD and running servers.

This now possible since the compiler is being moved to server less resources (#106, latticesurgery-com/compiler-lambda#1, #109, #110).

A reference on serverless computing with AWS for ideas: https://aws.amazon.com/getting-started/hands-on/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/, though we don't necessarily need to host with AWS because the website is completely decoupled.

If we want some business logic (logins, upload circuits ... pay for computing time 💰 🤠 💰) that can be implemented as a separate Python/Django serverless function.

I strongly suggest using react to populate the HTML page with data coming from the compiler API.

As I mentioned in another place, I will probably rebuild the website from scratch due to losing the form styling and default form values functionality which was embedded in Django, as well as other conveniences that Django provides for free. It may take me some extra time to learn React and implement CSRF tokens (will generate them with the Lambda), and recreate the templates using a different framework, but I'll keep you updated.

Addressed these comments here

Closing due to react page is functional and ready for deployment.