{"id":28792161,"url":"https://github.com/fulvioberretta/go-web-components","last_synced_at":"2026-04-13T16:34:27.242Z","repository":{"id":298337198,"uuid":"990685261","full_name":"FulvioBerretta/go-web-components","owner":"FulvioBerretta","description":"Simple webapp for commenting movie meaning with other people. The aim is to develop without dependency except the GO runtime and the SQLite3 driver.","archived":false,"fork":false,"pushed_at":"2025-06-13T14:39:19.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"dev","last_synced_at":"2025-06-18T01:01:50.509Z","etag":null,"topics":["css","go","golang","html","javascript","no-dependencies","web-components","webcomponents"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/FulvioBerretta.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,"zenodo":null}},"created_at":"2025-05-26T13:30:53.000Z","updated_at":"2025-06-10T15:16:28.000Z","dependencies_parsed_at":"2025-06-10T16:37:18.926Z","dependency_job_id":null,"html_url":"https://github.com/FulvioBerretta/go-web-components","commit_stats":null,"previous_names":["fulvioberretta/go-web-components"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FulvioBerretta/go-web-components","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FulvioBerretta%2Fgo-web-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FulvioBerretta%2Fgo-web-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FulvioBerretta%2Fgo-web-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FulvioBerretta%2Fgo-web-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FulvioBerretta","download_url":"https://codeload.github.com/FulvioBerretta/go-web-components/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FulvioBerretta%2Fgo-web-components/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260465873,"owners_count":23013443,"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":["css","go","golang","html","javascript","no-dependencies","web-components","webcomponents"],"created_at":"2025-06-18T01:01:04.004Z","updated_at":"2026-04-13T16:34:27.216Z","avatar_url":"https://github.com/FulvioBerretta.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## The Application Goal\n\nThe Goal here is to provide the user an application to discuss movie meaning, and finally understand\n(where possible) movies with obscure meaning. \nIf possible a function to ask the name of the movie based on the plot will be provided as well.\n\n## Design principles\n\nThe main design principle is simplicity.\nVarious options were evaluated in the beginning.\nA lot of solutions for both front-end and back-end \nare indeed powerful but comes with significant overhead.\n\n### Front End\n\nFront-end libraries and framework requires you to manage\ndependencies with the package.json. If you want to introduce\ntype-safety then you'll introduce typescript.\nYou'll need a separate framework, and you'll need a bundler.\nThen something bad in configurations typically occurs\nand development is slowdown.\nI decided to sacrificed customizability in favor\nof simplicity and terseness. \nI still wanted a separation from front-end and back-end,\nand I didn't like the idea of generating HTML server-side\nand using templating libraries like Jinja.\nI noticed that the Back-end APIs were simpler without the\nneed to generate templates, and just returning simple JSON\nresponses.\nI opted for alpineJS, that allowed me to reuse HTML and enhancing it\nwith just a few words pf syntax.\nThe experience has been pleasant with no issues at all.\nFor the styling I use a simple CSS library called PicoCSS.\n\n#### Javascript with Flow \nInstead of introducing the burden of having a transpiler I\nopted for Javascript's version called Flow.\n\n\"Flow adds static typing to JavaScript to improve developer productivity and code quality.\"\n( source. https://engineering.fb.com/2014/11/18/web/flow-a-new-static-type-checker-for-javascript/)\n\n#### Web Components\nI adopted web components when I realized I don't wanted to copy-paste\ntoo much HTML around. I could've opted for a templating solution like Jinja2,\nbut I just don't like the feeling of templating and I wanted to have\nFront-End separate from Back-End. \nSo I discovered the existence of Web Components and it seemed a perfect choice.\nI avoided Lit because of custom annotation and I think it could've be a \nuseless overhead for my scope here.\n\n### Back End\n\nThe Back-End has been built with fastAPI.\nI didn't know much about frameworks other than Spring, but I \ndecided to opt for a python framework because I liked \nthe simplicity and development speed i experienced with Flask\nduring the course psets.\nAfter FastAPI I realized that I wanted something minimal and \nno external dependencies; so I opted for Bottle that is very minimal\nand can be stored in a simple file. Very cool;\nHowever I stii need to use python and have the interpreter \nas a dependency whereas Go comes with a net/http library\nthat includes a web server right on the spot.\n\n### Database\n\nInitially I thought that I would use something like PostgreSQL.\nBut then I realized that it would have been a lot of struggle to only\nset up the database server, creating users and so on.\nSince I learned about the file-based nature of SQLite I wanted to use \nsomething like that, but I wanted to use something even more simpler.\nTinyDB allows me to interact even more freely with the DB, and the \nstructure of JSON makes it even easier to interact with it from the code,\nand returning directly the fetched Object from the DB.\nThis might come at the cost of added security risks, risks of inconsistent data,\nrisk of validation that is built-in with SQL, and so on.\nI think it still holds well for prototyping fast applications.\nI opted for TinyDB, but that can be changed eventually with SQLITE\nwhenever userbase grows above 5/10 people.\n\n## AI usage\n\nGemini has been used mainly to understand concepts and\nin the process of trying to resolve issues.\nAi has been used also for weighting the different approaches \n(e.g., SSR vs Single Page Application, HTMX vs AlpineJS, TinyDB vs SQLITE).\nWith this project the usage has been quite limited because it wasn't able\nto provide useful hints given these technologies not being mainstream;\nit eventually fell back in suggesting Flask/FastAPI/Django syntax, given\nthese are the most popular options.\nThe AI has been used a little for some hints regarding CSS styling.\n\n## Sources\n\n### Web Components\n#### https://www.youtube.com/watch?v=2I7uX8m0Ta0\n#### https://developer.mozilla.org/en-US/docs/Web/API/Web_components\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulvioberretta%2Fgo-web-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffulvioberretta%2Fgo-web-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulvioberretta%2Fgo-web-components/lists"}