{"id":14965781,"url":"https://github.com/bebeal/vite-amplify","last_synced_at":"2025-10-25T12:30:47.184Z","repository":{"id":250435586,"uuid":"834347991","full_name":"bebeal/vite-amplify","owner":"bebeal","description":"Template with Vite SSR + Express APIs + AWS Amplify Hosting","archived":false,"fork":false,"pushed_at":"2024-11-20T06:02:39.000Z","size":8790,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T07:11:12.053Z","etag":null,"topics":["amplify-hosting","aws","eslint","express","fullstack","nodejs","prettier","react","react-router","ssr","tailwindcss","typescript","vite","vite-ssr","vite-template","yarn"],"latest_commit_sha":null,"homepage":"https://vite-amplify.com/","language":"TypeScript","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/bebeal.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":"2024-07-27T02:39:40.000Z","updated_at":"2024-11-29T09:20:58.000Z","dependencies_parsed_at":"2024-07-27T12:34:08.803Z","dependency_job_id":"8e95fe3a-1809-48a3-ac87-57db9afc62d3","html_url":"https://github.com/bebeal/vite-amplify","commit_stats":null,"previous_names":["bebeal/vite-amplify"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bebeal%2Fvite-amplify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bebeal%2Fvite-amplify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bebeal%2Fvite-amplify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bebeal%2Fvite-amplify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bebeal","download_url":"https://codeload.github.com/bebeal/vite-amplify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238137867,"owners_count":19422716,"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":["amplify-hosting","aws","eslint","express","fullstack","nodejs","prettier","react","react-router","ssr","tailwindcss","typescript","vite","vite-ssr","vite-template","yarn"],"created_at":"2024-09-24T13:35:17.565Z","updated_at":"2025-10-25T12:30:47.179Z","avatar_url":"https://github.com/bebeal.png","language":"TypeScript","funding_links":[],"categories":["Recently Updated","Get Started"],"sub_categories":["[Oct 01, 2024](/content/2024/10/01/README.md)","Templates"],"readme":"\u003cdiv align=\"center\"\u003e\n\n# vite-amplify\n\nVite Template with Vite SSR + Express APIs + AWS Amplify Hosting.\n\n\u003csmall style=\"font-size:0.9em\"\u003eAlso available with no server side rendering:  \n\u003ca href=\"https://github.com/bebeal/vite-amplify/tree/no-ssr\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/-no--ssr%20branch-ffffff?logo=github\u0026style=flat\u0026logoColor=000000\" style=\"height:14px; vertical-align:middle\"\u003e\u003c/a\u003e\u003c/small\u003e (\u003ca href=\"https://vite-amplify-no-ssr.com\"\u003evite-amplify-no-ssr.com\u003c/a\u003e)\n\n\u003ca href=\"https://vite-amplify.com\" rel=\"noopener noreferrer\" target=\"_blank\"\u003evite-amplify.com\u003c/a\u003e\n\n\u003ca href=\"https://www.youtube.com/watch?v=dsHQUgwkZ7s\" rel=\"noopener noreferrer\" target=\"_blank\"\u003e~4 mins from fork-to-finish for a successful deployment\u003c/a\u003e\n\u003c/div\u003e\n\n![vite-amplify-landing](https://github.com/user-attachments/assets/7dc6d026-5c3a-44d2-b58e-ad6a35d87c21)\n\n\n## Features\n\n* [Node](https://nodejs.org/docs)\n* [Yarn](https://classic.yarnpkg.com/en/docs)\n* [Vite](https://vitejs.dev/guide/)\n* [React](https://react.dev/reference/react)\n* [TypeScript](https://www.typescriptlang.org/docs/)\n* [Express](https://expressjs.com/en/4x/api.html)\n* [React Router](https://reactrouter.com/en/main)\n* [Tailwind](https://tailwindcss.com/docs)\n* [Eslint](https://eslint.org/docs/latest/)\n* [Prettier](https://prettier.io/docs/en/)\n* [Amplify Hosting](https://docs.aws.amazon.com/amplify/latest/userguide)\n* [AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/home.html)\n\n## Other Libraries\n\n* [nodemon](https://github.com/remy/nodemon)\n* [tsx](https://github.com/privatenumber/tsx)\n* [dotenv](https://github.com/motdotla/dotenv?tab=readme-ov-file)\n* [svgr](https://github.com/gregberge/svgr)\n* [react-tweet](https://github.com/vercel/react-tweet)\n* [next-themes](https://github.com/pacocoursey/next-themes)\n\n## Development\n\nUsing yarn\n```bash\nyarn install      // install dependencies\n```\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"894\" alt=\"425781036-dacb70a0-1228-4cb1-b4a6-8ee62b64aa52\" src=\"https://github.com/user-attachments/assets/e36ed390-d7dd-428a-8938-628da134e88a\" /\u003e\n\u003c/div\u003e\n\n```bash\nyarn dev          // run the development server\n```\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"894\" alt=\"425781309-25c7c40e-b8e0-4d4c-9fd7-f565d9bc9eb8\" src=\"https://github.com/user-attachments/assets/b88065b8-a66f-4e9e-b9fc-9b5d823a4120\" /\u003e\n\u003c/div\u003e\n\n```bash\nyarn build        // build both client side and server side build\n```\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"894\" alt=\"425345804-2eb9c561-bd5a-411c-9acf-d31074abb794 (1)\" src=\"https://github.com/user-attachments/assets/3f994f23-476b-4ed7-9109-50d40c0495f2\" /\u003e\n\u003c/div\u003e\n\n**Additional Commands**\n\n```bash\nyarn clean        // clean everything thats generated in the build/dev process\nyarn build:client // build the client side to dist/client\nyarn build:server // build the server side to dist/server\nyarn lint         // run eslint\nyarn format       // run prettier\n```\n\n## CDK\n\n```bash\nyarn build:cdk    // build the cdk\nyarn deploy:cdk   // deploy the cdk\n```\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"787\" alt=\"425349353-ad9d52cc-9046-4cd2-b072-1b47083eb48d\" src=\"https://github.com/user-attachments/assets/0ea6d023-35dc-41c6-86c5-84adc5bb19c6\" /\u003e\n\u003c/div\u003e\n\n## Amplify Hosting\n\nTo deploy to Amplify Hosting\n\n1. Create repository from template\n2. Deploy to AWS\n\n**Note:** set env variable `YARN_ENABLE_IMMUTABLE_INSTALLS=0` in the Amplify console\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"1365\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/58f6b7b7-fa08-4288-87f1-953678985910\" /\u003e\n\u003c/div\u003e\n\n## Build\n\nThe build outputs to `dist` folder. The build is split into two parts, the client side and the server side.\n\n```console\ndist\n├── client\n│   ├── assets\n│   │   ├── index-CjfxHUYp.css       28.14 kB │ gzip:     6.28 kB\n│   │   └── index-CyAzpqo0.js       326.88 kB │ gzip:   109.05 kB\n│   ├── favicon.ico                  14.73 kB │ gzip:     4.46 kB\n│   ├── index.html                     .56 kB │ gzip:      .35 kB\n│   └── robots.txt                     .06 kB │ gzip:      .08 kB\n└── server\n    ├── api\n    │   ├── api.d.ts                   .21 kB │ gzip:      .16 kB\n    │   └── api.js                    1.01 kB │ gzip:      .47 kB\n    ├── entry-server.js              56.77 kB │ gzip:    20.72 kB\n    ├── favicon.ico                  14.73 kB │ gzip:     4.46 kB\n    ├── robots.txt                     .06 kB │ gzip:      .08 kB\n    ├── server.d.ts                    .25 kB │ gzip:      .18 kB\n    ├── server.js                     4.52 kB │ gzip:     1.84 kB\n    ├── tsconfig.node.tsbuildinfo    46.99 kB │ gzip:    14.90 kB\n    ├── vite.config.d.ts               .08 kB │ gzip:      .10 kB\n    └── vite.config.js                1.39 kB │ gzip:      .52 kB\n\n5 directories, 15 files\n```\n\n## Amplify Build\n\n* `amplify.yml` is the build spec for Amplify Hosting ([AWS Docs](https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html))\n\n* `deploy-minifest.json` is the deployment spec and is what deploys the express api server ([AWS Docs](https://docs.aws.amazon.com/amplify/latest/userguide/ssr-deployment-specification.html))\n\n* `postbuild.sh` will take the build from `dist` and copy it over to the amplify build folder (`.amplify-hosting`) which results in ([AWS Docs](https://docs.aws.amazon.com/amplify/latest/userguide/deploy-express-server.html)):\n\n```console\n.amplify-hosting\n├── compute\n│   └── default\n│       ├── client\n│       │   ├── assets\n│       │   │   ├── index-CjfxHUYp.css          28.14 kB │ gzip:     6.28 kB\n│       │   │   └── index-CyAzpqo0.js          326.88 kB │ gzip:   109.05 kB\n│       │   ├── favicon.ico                     14.73 kB │ gzip:     4.46 kB\n│       │   ├── index.html                        .56 kB │ gzip:      .35 kB\n│       │   └── robots.txt                        .06 kB │ gzip:      .08 kB\n│       ├── package.json                         2.22 kB │ gzip:      .90 kB\n│       └── server\n│           ├── api\n│           │   ├── api.d.ts                      .21 kB │ gzip:      .16 kB\n│           │   └── api.js                       1.01 kB │ gzip:      .47 kB\n│           ├── entry-server.js                 56.77 kB │ gzip:    20.72 kB\n│           ├── favicon.ico                     14.73 kB │ gzip:     4.46 kB\n│           ├── robots.txt                        .06 kB │ gzip:      .08 kB\n│           ├── server.d.ts                       .25 kB │ gzip:      .18 kB\n│           ├── server.js                        4.52 kB │ gzip:     1.84 kB\n│           ├── tsconfig.node.tsbuildinfo       46.99 kB │ gzip:    14.90 kB\n│           ├── vite.config.d.ts                  .08 kB │ gzip:      .10 kB\n│           └── vite.config.js                   1.39 kB │ gzip:      .52 kB\n├── deploy-manifest.json                          .83 kB │ gzip:      .33 kB\n└── static\n    ├── favicon.ico                             14.73 kB │ gzip:     4.46 kB\n    └── robots.txt                                .06 kB │ gzip:      .08 kB\n\n8 directories, 19 files\n```\n\n## Lighthouse\n\n\u003cimg width=\"344\" alt=\"100_91_96_100\" src=\"https://github.com/user-attachments/assets/aa73009d-2c8d-4b48-bd8c-231418a8f051\"\u003e\n\n¯\\\\_(ツ)_/¯ 🧂 [lighthouse_summary_100_91_96_100_july282024.pdf](https://github.com/user-attachments/files/16407666/lighthouse_summary_100_91_96_100_july282024.pdf)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbebeal%2Fvite-amplify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbebeal%2Fvite-amplify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbebeal%2Fvite-amplify/lists"}