{"id":33261987,"url":"https://github.com/damiensedgwick/napp","last_synced_at":"2026-05-15T17:05:17.409Z","repository":{"id":225020241,"uuid":"764869705","full_name":"damiensedgwick/napp","owner":"damiensedgwick","description":"Napp: A command line tool that bootstraps Go, HTMX and SQLite web applications and Dockerises them for ease of deployment.","archived":false,"fork":false,"pushed_at":"2025-05-30T20:29:17.000Z","size":202,"stargazers_count":59,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-17T04:08:59.839Z","etag":null,"topics":["go","golang","htmx","htmx-go","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Go","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/damiensedgwick.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":"2024-02-28T21:25:43.000Z","updated_at":"2025-10-10T22:45:44.000Z","dependencies_parsed_at":"2024-04-08T13:43:07.804Z","dependency_job_id":"1296a650-5279-499f-b890-c18e1f790fd2","html_url":"https://github.com/damiensedgwick/napp","commit_stats":null,"previous_names":["damiensedgwick/napp"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/damiensedgwick/napp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damiensedgwick%2Fnapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damiensedgwick%2Fnapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damiensedgwick%2Fnapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damiensedgwick%2Fnapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damiensedgwick","download_url":"https://codeload.github.com/damiensedgwick/napp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damiensedgwick%2Fnapp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33072974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["go","golang","htmx","htmx-go","sqlite3"],"created_at":"2025-11-17T04:00:54.447Z","updated_at":"2026-05-15T17:05:17.403Z","avatar_url":"https://github.com/damiensedgwick.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Napp\n\nNapp is an abbreviation of 'Nano App' which is a term I am using to describe a web application\nthat has a very small footprint. Specifically, Napp bootstraps a new application for you by\ncreating a project, necessary files and connects them all up so you can dive straight into\nbuilding your application.\n\n## Table of Contents\n\n- [About](#about)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Deployment](#deployment)\n- [Contributing](#contributing)\n- [Contributors](#contributors)\n- [License](#license)\n\n## About\n\n**What is a Nano App?**\nThe rules are simple, a nano app must have as few files as possible, as few directories as possible,\nlittle to no JavaScript (minus HTMX), has a small Docker image (size does matter) and must be easy\nto develop and deploy.\n\nIf you want to take a look at how a Nano App is structured by napp, please vist [Napp Generated](https://github.com/damiensedgwick/napp-generated)\n\nBelow are some potential use cases for a Nano App.\n\n**UI/UX Experimentation** - Use HTMX's dynamic capabilities to experiment with different user events.\n\n**Proof of Concepts** - Create a lightweight app to showcase the feasibility of a technical concept.\n\n**Admin Interfaces** - Develop basic admin panels to manage users, or config settings for internal systems.\n\n**Go Practice** - Use Napp as a framework to build small projects and improve your Go and web skills.\n\n**HTMX Exploration** - Explore the power of HTMX for building reactive interfaces with minimal JavaScript.\n\n## Prerequisites\n\n- Go (this project is built with 1.24) but it should work with older versions too.\n- Make sure your Go bin is added to your path so that installed packages can be used globally.\n\n## Installation\n\n### Using Go\n\n`go install github.com/damiensedgwick/napp@latest`\n\n### Using a release binary\n\nYou can download the compiled binary for your machine from [Releases](https://github.com/damiensedgwick/napp/releases).\nOnce you have done this, make sure the executable has the correct permissions and make sure it is in your path.\n\n## Usage\n\n### Generate a new Napp\n\n`napp init \u003cproject-name\u003e`\n\n`cd \u003cproject-name\u003e`\n\n`go mod init \u003cyour-chosen-path\u003e`\n\n`go mod tidy`\n\n### Other commands\n\nDisplay the Napp help menu to get a list of currently available commands.\n\n`napp --help`\n\nGet the current version with the following command:\n\n`napp --version`\n\n## Running the application\n\n### Go\n\nGo has everything you need to build and run the application locally and it is\nusually the default choice when wanting to develop and iterate quickly.\n\n`go run cmd/main.go`\n\n### Docker\n\nDocker has been setup is so that the binary is prebuilt using Go and then it is simply\ncopied into the Docker image, resulting in a smaller footprint the final Docker image.\n\n**NB** The Dockerfile is currently setup to build for Linux, if your OS is not Linux\nyou will need to change it accordingly.\n\n`docker build -t app-name .`\n\n`docker run -d -p 8080:8080 app-name`\n\n## Deployment\n\nAt the moment I recommend using Fly.io for deploying Nano Apps. They provide a great\ncommand line tool to make managing the process easy and you can have 3 x small projects\non there each with a 1gb persisted SQLite database volume for prototyping.\n\n### Getting your Nano App Deploy on Fly.io\n\nYou will need to make sure you have the Fly.io command line tools installed for the\nfollowing steps. If you do not have them installed, you can find out how to install them\nhere: [flyctl command line tool](https://fly.io/docs/hands-on/install-flyctl/)\n\nOnce you have installed the above command line tools and signed in to Fly.io, you are\nready to proceed with the next steps, each step is supposed to be run from your project\nroot.\n\n1. Get your app ready for deploying: `fly launch --no-deploy`\n\nThe command line will prompt you to check if you would like to change the default\nconfiguration. It is important to say yes so that you can select your region and\nlower the apps memory to 256mb vs the default settings.\n\n2. Copy the following into your `fly.toml`\n\n```toml\n[[mounts]]\n  source = \"godo_database\"\n  destination = \"/data\"\n  initial_size = \"1gb\"\n```\n\n3. Deploy your application `fly deploy`\n\nThis command should now deploy your application to Fly.io and create the\nnecessary resources (such as our volume) in the process.\n\n4. List Machines to check attached volumes: `fly machine list`\n\n```bash\n# expected output\nmy-app-name\nID              NAME        STATE   REGION   IMAGE                  IP ADDRESS                      VOLUME                  CREATED                 LAST UPDATED            APP PLATFORM    PROCESS GROUP   SIZE\n328773d3c47d85  my-app-name stopped yul     flyio/myimageex:latest  fdaa:2:45b:a7b:19c:bbd4:95bb:2  vol_6vjywx86ym8mq3xv    2023-08-20T23:09:24Z    2023-08-20T23:16:15Z    v2              app             shared-cpu-1x:256MB\n```\n\n5. List volumes to check attached Machines: `fly volumes list`\n\n```bash\n# expected output\nID                      STATE   NAME    SIZE    REGION  ZONE    ENCRYPTED       ATTACHED VM     CREATED AT\nvol_zmjnv8m81p5rywgx    created data    1GB     lhr     b6a7    true            5683606c41098e  3 minutes ago\n```\n\n6. Add your environment variables to Fly.io\n\nYou will need to add the following variables to your app in the Fly.io dashboard.\nFirst navigate to your machine and then to secrets.\n\nAdd the following 2 secrets:\n\n`APPNAME_NAME_COOKIE_STORE_SECRET=\"value\"` or `APP_NAME_NAME_COOKIE_STORE_SECRET=\"value\"`\n\nand\n\n`APPNAME_NAME_DB_PATH=\"value\"` or `APP_NAME_DB_PATH=\"value\"`\n\n**NB** Check your generated `.env` file to see how your app name should be\nwritten and add your database path value and your cookie store secret value.\n\nOnce these have both been added, we should be ready to deploy for the last time!\n\n6. Run the following command to deploy your app and make use of your .env variables\n\n`fly deploy`\n\n🎉 That should be all you need to do to get your nano app deployed on Fly.io with persisted storage. 🎉\n\n## Contributing\n\nI'd love to have your help making Napp even better! Here's how to get involved:\n\n- Fork the repository. This creates your own copy where you can work on changes.\n- Create a separate branch for your changes. This helps keep your work organised.\n- Open a pull request with a clear description of your contributions.\n\n## Contributors\n\nA huge shoutout to the following for contributing towards Napp and making it all that\nlittle bit better!\n\n- [Dmytro Borshcanenko](https://github.com/parMaster)\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) \u003cyear\u003e Adam Veldhousen\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamiensedgwick%2Fnapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamiensedgwick%2Fnapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamiensedgwick%2Fnapp/lists"}