{"id":15113871,"url":"https://github.com/nexentra/midgard","last_synced_at":"2026-01-19T07:12:24.157Z","repository":{"id":231748776,"uuid":"678695664","full_name":"nexentra/midgard","owner":"nexentra","description":"Mini Headless CMS","archived":false,"fork":false,"pushed_at":"2024-04-12T16:37:36.000Z","size":25717,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-04-12T20:37:07.505Z","etag":null,"topics":["bash-script","docker","flyio","golang","postgresql","react","tailwind","taskfile"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nexentra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-08-15T06:37:16.000Z","updated_at":"2024-04-14T18:37:21.507Z","dependencies_parsed_at":"2024-04-14T18:49:37.749Z","dependency_job_id":null,"html_url":"https://github.com/nexentra/midgard","commit_stats":null,"previous_names":["nexentra/midgard"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexentra%2Fmidgard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexentra%2Fmidgard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexentra%2Fmidgard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexentra%2Fmidgard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nexentra","download_url":"https://codeload.github.com/nexentra/midgard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378140,"owners_count":20929296,"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":["bash-script","docker","flyio","golang","postgresql","react","tailwind","taskfile"],"created_at":"2024-09-26T01:23:38.423Z","updated_at":"2026-01-19T07:12:24.144Z","avatar_url":"https://github.com/nexentra.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go + TypeScript/JavaScript Boilerplate\n\nThis is a comprehensive boilerplate project that combines a Go backend with a TypeScript/JavaScript frontend, featuring a wide range of technologies and features for building robust and scalable applications.\n\n## Technologies and Features\n\n#### Backend:\n\n- Go language\n- Labstack Echo framework\n- Gorm ORM (supports SQLite, PostgreSQL, MySQL)\n- Swagger for API documentation\n- Automated GitHub releases with GoReleaser\n\n#### Frontend:\n\n- TypeScript/JavaScript\n- Next.js 14\n- Shadcn UI + Tailwind CSS for UI\n- Clerk for authentication\n- Ionic Capacitor for iOS and Android native app export\n- Wails for macOS, Windows, and Linux native app export\n- Orval for generating types and API clients from Swagger specs\n\n#### CI/CD:\n\n- GitHub Actions for testing, code build checks, automated releases\n- Codacy for code quality analysis\n- CodeQL for security scans\n\n#### Infrastructure:\n\n- Fully dockerized builds with Dockerfiles and Docker Compose\n- Terraform for automated EC2 instance creation and deployment\n\n## Getting Started\n\n### Prerequisites\n\n- Go (latest stable version)\n- Node.js (latest LTS version)\n- Tmux (for running both backend and frontend together) (Optional)\n\n### Local Development\n\n0. Create a new repository from the [template](https://github.com/nexentra/midgard.git).\n\n1. Clone the repository.\n\n2. Run the setup script:\n\n```bash\nmake setup\n```\n\nThis command will install all dependencies and create environment variable files.\n\n3. Configure the environment variables in the `.env` and `client/.env.local` file.\n\n4. Start the development:\n\n```bash\nmake run\n```\n\nThis command will start both the backend and frontend using Tmux for the development environment. You can also run them separately:\n\n```bash\n# Start the backend\nmake run-server\n\n# Start the frontend\nmake run-client\n```\n\nAlternatively, you can use the following commands:\n\n```bash\n# Start the backend\ngo run . start\n\n# Start the frontend\ncd client \u0026\u0026 yarn dev\n```\n\nYou can also run `go run . help` for an overview of available commands and options from the CLI.\n\n### Swagger and Orval API Documentation\n\n```bash\nmake docs-gen\n```\n\nThis command will generate the Swagger and Orval API types, documentations and client.\n\nView the Swagger UI at `http://localhost:8000/api/swagger/index.html`.\n\n### Deployment\n\n#### Binary Distribution\n\nYou can bundle the frontend and backend into a single binary for deployment, run:\n\n```bash\nmake builder\n```\n\n#### Docker Image\n\nTo build the Docker image, run:\n\n```bash\nmake docker-run\n```\n\n#### AWS EC2 Deployment with Terraform\n\nTo deploy the application to AWS EC2 using Terraform:\n\n1. Ensure Terraform CLI is installed locally.\n\n2. Make sure you have an AWS key pair named midgard in the us-east-1 region, and download the private key (midgard.pem) to the project's root directory.\n\n3. Navigate to the Terraform directory:\n\n```bash\ncd ci/terraform-ec2\n```\n\n4. Initialize Terraform:\n\n```bash\nterraform init\n```\n\n5. Apply the Terraform configuration:\n\n```bash\nterraform apply\n```\n\n6. Destroy the Terraform configuration:\n\n```bash\nterraform destroy\n```\n\n#### IOS and Android Native App Export\n\nBefore exporting the iOS and Android native apps, make sure you have installed XCode (for IOS) and Android Studio (for Android).\n\nTo export the IOS and Android native apps, follow these steps:\n\n```bash\n# change directory to the client directory\ncd client\n\n# Add the native platforms\nnpx cap add ios\nnpx cap add android\n\n# build the web app\nyarn export\n\n# sync the capacitor\nnpx cap sync\n\n# open the native apps in xcode and android to build\nnpx cap open ios\nnpx cap open android\n```\n\n#### macOS, Linux, and Windows Native App Export\n\nBefore exporting the macOS, Linux, and Windows native apps, make sure you have installed the [Wails](https://wails.io) and it's required dependencies based on your platform. Also you need XCode for the MacOS native app.\n\nTo export the macOS, Linux, and Windows native apps, follow these steps:\n\n```bash\n# change directory to the scripts/build-wails directory\ncd scripts/build-wails\n\n# You need to Run the sh scripts based your platform and release types\n# For example if you want to build the universal macOS native app, you need to run:\nsudo sh ./scripts/build-wails/build-macos.sh\n```\n\n\n### CI/CD\n\n#### Configure GitHub Actions for CI/CD\n\n1. Add these envs to your repo secrets:\n\n```bash\nNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY= # Publishable key\nCLERK_SECRET_KEY= # Secret key\nNEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in\nNEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up\nNEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/\nNEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/\n\nGO_RELEASER_GITHUB_TOKEN= # GitHub token\n```\n\n2. Push to `main` or `dev` branch to trigger the CI/CD pipeline.\n\n3. Run `make release version=v0.0.1` to create a release. NOTE: the `version` argument needs to be a valid semantic version.\n\n## Limitations\n\n- Server-side rendering (SSR) is not supported in Next.js, as the frontend needs to be statically exported to run with native apps.\n- The Wails app cannot be run in development mode; it needs to be built before running. Check the scripts/build-wails directory for various platform build scripts for Wails.\n\n## Roadmap\n\n- Improve folder structure and organization.\n- Address current limitations.\n- Add Ory Kratos and Keto for authentication and authorization.\n- Integrate Grafana Labs tools for monitoring, load testing, and logging.\n- Add Terraform support for other cloud platforms.\n- Add Kubernetes support.\n- Implement tests.\n- And more!\n\n## Contributing\n\nContributions are welcome! Please follow the guidelines in the [contributing guide](CONTRIBUTING.md) for details on how to contribute.\n\n## License\n\nThis project is licensed under the [BSD 3-Clause License](LICENSE.md)\n\n## Changelog\n\nCheck the release notes [here](https://github.com/nexentra/midgard/releases)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexentra%2Fmidgard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexentra%2Fmidgard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexentra%2Fmidgard/lists"}