Git Product home page Git Product logo

aidezilla's Introduction

Aidezilla

Full stack Clojure/Clojurescript app

backend: deps.edn, jetty, reitit, aero

I've commented out some dependencies in deps.edn, mostly database stuff. You can just delete that if not needed. Integrant to be added shortly.

frontend: shadow-cljs, reagent, re-frame, re-frame-10x, tailwindcss, daisyui

deployed through dockerfile

Demo is currently deployed and running live through render.com at: https://clojure-demo-app.onrender.com/

With a simple "Hello World" component I get 100% scores across the board on Lighthouse.

The free tier allows for 512mb and this demo seems to use up to ~170mb for just the "Hello World" according to render.com's metrics but I haven't looked into too much yet.

The dockerfile should allow it to be used elsewhere like fly.io, railway.app, and heroku but I haven't tested.

** I don't know how to actually create an official template yet so I manually have to change every occurrence of TODO in the repo to whatever I want the app name to be. Obviously not ideal so if you know how to change that, I would love to know. **

For dev and prod:

npm install

For dev:

shadow-cljs watch app npm run tw

Right now this runs the app serve on port 4000 (which is what render.com wants) but also runs shadow-cljs's HTTP server built on port 3000. I'll probably tweak this workflow but when I just want to work client side and don't need the app server I just run shadow-cljs watch app instead of the npm script

nrepl port on 7002

I use neovim w/conjure so run your editor's equivalent of: ConjureShadowSelect app

This should give you hot reloading on save, including tailwind css changes. For dev, I switched to using tailwind's cdn as I was getting sever performance problems and other issues when using postcss with shadow-cljs hot reloading. Now it all works great and the cdn will not be included in the production build (which still uses postcss for treeshaking, etc.) One hacky aspect of this fix is that I have to have the tailwind.config.js file at both the root level and again copied into the resources folder. I am currently looking into a fix on that.

Backend:

To start the server run clojure -M -m server.core

Start your normal repl like usual. (e.g. For me that's clj -M:repl and connect.)

TBH, I'm not quite sure how to have the backend and frontend connected to their respective repls and running at the same time quite yet.

For prod:

shadow-cljs release app npm run tailwind java -jar target/aidezilla.jar

aidezilla's People

Contributors

chase-lambert avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.