{"id":18074375,"url":"https://github.com/headwinds/whistlepunk","last_synced_at":"2025-04-05T18:45:27.993Z","repository":{"id":150897681,"uuid":"176798125","full_name":"headwinds/whistlepunk","owner":"headwinds","description":"clojure service to track achievements and log events","archived":false,"fork":false,"pushed_at":"2019-03-20T20:10:24.000Z","size":8149,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-11T16:19:22.663Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/headwinds.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-20T18:53:07.000Z","updated_at":"2019-03-20T20:10:25.000Z","dependencies_parsed_at":"2023-04-08T19:48:01.874Z","dependency_job_id":null,"html_url":"https://github.com/headwinds/whistlepunk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headwinds%2Fwhistlepunk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headwinds%2Fwhistlepunk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headwinds%2Fwhistlepunk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headwinds%2Fwhistlepunk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/headwinds","download_url":"https://codeload.github.com/headwinds/whistlepunk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247385623,"owners_count":20930599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-31T10:12:26.685Z","updated_at":"2025-04-05T18:45:27.974Z","avatar_url":"https://github.com/headwinds.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lesson 2 Clojure \u0026 PostgreSQL\n\nIn a future of driverless vehicles, the concept of a pilot is certainly shifting from someone who operates to someone who guides.\n\nIn this lesson, we'll look at how Clojure talks to PostgreSQL, and create a database of pilots who maintain their ships more than actually drive them.\n\nYou are in charge of a mixed fleet of mechs, piloted by miners, and each mech is assisted by several unmanned drones. Motivate each pilot by awarding them achievements based on their harvest so that you can build up vast resources of cannibalized machines, stripped of their precious metals, and appease your anxious overlords.\n\nSince you are building an API, there are two apps in play here split between front and backend. The frontend app is built with [nuxtjs](https://nuxtjs.org/guide/installation) while the backend app is all Clojure. In lesson 3, you can play with an app built with Clojure \u0026 ClojureScript and learn how you can use Clojure across front and backend but this lesson I wanted to keep them separate to show that you can choose a different JS framework like Angular, React, or even vanilla JS like the first lesson.\n\n## dependencies\n\n- [clojure](https://blog.venanti.us/why-clojure/)\n- [compojure](https://github.com/weavejester/compojure/wiki)\n- [ring](https://github.com/ring-clojure/ring/wiki)\n- [postgreSQL](https://www.infoworld.com/article/3240064/sql/why-old-school-postgresql-is-so-hip-again.html)\n- [environ](https://yobriefca.se/blog/2014/04/29/managing-environment-variables-in-clojure/)\n- [hiccup](https://github.com/weavejester/hiccup)\n\n# Getting Started\n\n## Backend - Trophy Shed\n\nBefore you run, you need to create your own config files that will talk to postgres on Heroku. Locate \nthe heroku_config_sample.clj and rename it to heroku_config.clj with your settings. Repeat this process for profiles_sample.clj.\n\n\n```\n$ lein run\n```\n\n## Frontend - Trophy Creator\n\nTo get started:\n\n```\n  cd trophy-creator\n  yarn run dev\n```\n\nTo build \u0026 start for production:\n\n```\n  cd trophy-creator\n  yarn run build\n  yarn start\n```\n\n## Deploy to Heroku\n\nCopy this lesson into a new directory outside of this git repo so that it has it own git repo. We don't want to have nested repos.\n\nThis order is important:\n\n```\nheroku login\ngit init\ngit add .\ngit commit -m \"first commit\"\nheroku create\ngit push heroku master\nheroku ps:scale web=1\nheroku open\n```\n\nThen open your browser to whatever url it created ie: https://glacial-badlands-20785.herokuapp.com/\n\n## Inspiration\n\nWatch [Obvillion](https://www.wired.com/2013/04/oblivion-movie-questions/) then watch [the making of...](https://www.youtube.com/watch?v=iYryNL1FlPk)\n\n## Reading\n\n * [postgres clojure java jbdc](http://peterstratton.com/posts-output/2017-01-28-postgres-and-clojure-using-clojure-java-jdbc/) (*highly recommend*)\n* [An Animated Introduction to Clojure](https://ourcodestories.com/markm208/Playlist/4)  \n* [this Rich Hickey thread](https://twitter.com/richhickey/status/1057970957040660480)\n* [understanding lein run](http://www.flyingmachinestudios.com/programming/how-clojure-babies-are-made-lein-run/)\n* [clojure postgres](https://web.archive.org/web/20161024231548/http://hiim.tv/clojure/2014/05/15/clojure-postgres-json/)\n* [clj-postgresql](https://github.com/remodoy/clj-postgresql)\n* [hugsql](https://www.compose.com/articles/embrace-sql-with-hugsql-clojure-and-postgresql/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheadwinds%2Fwhistlepunk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheadwinds%2Fwhistlepunk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheadwinds%2Fwhistlepunk/lists"}