{"id":18254924,"url":"https://github.com/dannycahyo/universal-web-app","last_synced_at":"2025-04-08T21:48:52.430Z","repository":{"id":188950127,"uuid":"679751543","full_name":"dannycahyo/universal-web-app","owner":"dannycahyo","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-03T15:06:06.000Z","size":180,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T17:18:21.981Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dannycahyo.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}},"created_at":"2023-08-17T14:33:23.000Z","updated_at":"2023-08-18T08:14:17.000Z","dependencies_parsed_at":"2023-08-18T10:08:29.590Z","dependency_job_id":null,"html_url":"https://github.com/dannycahyo/universal-web-app","commit_stats":null,"previous_names":["dannycahyo/pure-spa","dannycahyo/universal-web-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannycahyo%2Funiversal-web-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannycahyo%2Funiversal-web-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannycahyo%2Funiversal-web-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannycahyo%2Funiversal-web-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dannycahyo","download_url":"https://codeload.github.com/dannycahyo/universal-web-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247934808,"owners_count":21020724,"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-11-05T10:14:00.052Z","updated_at":"2025-04-08T21:48:52.399Z","avatar_url":"https://github.com/dannycahyo.png","language":"JavaScript","readme":"# Universal Web App\n\nWelcome to **Universal Web App**, a web application that seamlessly blends Single Page Application (SPA) and Multi-Page Application (MPA) paradigms. This project combines client-side interactivity with server-side routing and rendering, providing a versatile web experience.\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js and npm (Node Package Manager) installed on your machine.\n\n### Installation\n\n1. Clone the repository to your local machine:\n\n   ```sh\n   git clone https://github.com/dannycahyo/universal-web-app.git\n   ```\n\n2. Navigate to the project directory:\n\n   ```sh\n   cd universal-web-app\n   ```\n   \n3. Install the dependencies:\n\n   ```sh\n   npm install\n   ```\n\n## Usage\n\nThis project, **Universal Web App**, is designed for learning and experimentation with building web applications using vanilla JavaScript, both as a Single Page Application (SPA) and a Multi-Page Application (MPA). Below are the available scripts for development and production:\n\n### Development Mode\n\nTo run the application in development mode, use the following command:\n\n```sh\nnpm run dev\n```\n\nThis script does two main things:\n\n1. **Webpack Build (Client-side):** It uses Webpack to bundle your JavaScript and assets in development mode, creating the `index__bundle.js` file in the `dist` folder.\n\n2. **Node.js Server (Server-side):** It starts the Node.js server using `node app.js`. The server serves your bundled application and provides server-side routing and rendering.\n\nThe development mode includes hot module replacement (HMR) for the client-side, allowing you to see changes in real-time without needing to manually refresh the page.\n\n### Production Build\n\nTo create a production-ready build of your application, use the following command:\n\n```sh\nnpm run build\n```\n\nThis script performs two tasks:\n\n1. **Webpack Build (Client-side):** It uses Webpack to bundle your JavaScript and assets in production mode, optimizing for performance. The optimized files are placed in the `dist` folder.\n\n2. **Node.js Server (Server-side):** Similar to the development mode, it starts the Node.js server using `node app.js`. This server serves your production-ready application.\n\nThe production build is suitable for deploying your application to a hosting provider.\n\nKeep in mind that the project uses various dependencies like EJS for templating, Express for server-side routing, and Webpack for bundling. Explore and modify the project as needed for your learning journey and web development experiments.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannycahyo%2Funiversal-web-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannycahyo%2Funiversal-web-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannycahyo%2Funiversal-web-app/lists"}