{"id":22378044,"url":"https://github.com/mohamedsamara/react-frontend-optimization","last_synced_at":"2025-03-26T18:23:31.041Z","repository":{"id":266321106,"uuid":"897945282","full_name":"mohamedsamara/react-frontend-optimization","owner":"mohamedsamara","description":"⚡ Frontend Optimization with React","archived":false,"fork":false,"pushed_at":"2025-01-26T12:43:34.000Z","size":158,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T13:37:00.723Z","etag":null,"topics":["background-sync","offline","push-notifications","pwa","service-worker"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohamedsamara.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-12-03T14:14:34.000Z","updated_at":"2025-01-26T12:43:38.000Z","dependencies_parsed_at":"2024-12-03T17:53:15.394Z","dependency_job_id":"994058b0-617c-471a-8171-91077f029662","html_url":"https://github.com/mohamedsamara/react-frontend-optimization","commit_stats":null,"previous_names":["mohamedsamara/react-frontend-optimization"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedsamara%2Freact-frontend-optimization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedsamara%2Freact-frontend-optimization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedsamara%2Freact-frontend-optimization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedsamara%2Freact-frontend-optimization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohamedsamara","download_url":"https://codeload.github.com/mohamedsamara/react-frontend-optimization/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245709651,"owners_count":20659742,"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":["background-sync","offline","push-notifications","pwa","service-worker"],"created_at":"2024-12-04T22:17:11.333Z","updated_at":"2025-03-26T18:23:31.005Z","avatar_url":"https://github.com/mohamedsamara.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Frontend Optimization\n\nThis project serves as a template for building Progressive Web Apps (PWAs) that include offline functionality, background syncing, push notifications, and code splitting. The app leverages service workers for offline support and background syncing, ensuring data is kept up-to-date.\n\n## Features\n\n- Progressive Web App (PWA): Works offline and can be installed for use on mobile and desktop.\n- Offline Functionality: Create, edit, and delete content without an internet connection. Data is stored using IndexedDB.\n- Background Syncing: Changes are automatically synced when the device is online. This sync process updates the server with the most recent data.\n- Push Notifications: Notifications alert users to updates and changes within the app.\n- Code Splitting: Improves initial load performance by loading only the necessary code.\n\n## Setup Instructions\n\n1. Start the Backend Server and Frontend\n\n   To start the server and frontend together, use the following steps:\n\n   1. Install dependencies: First, navigate to your project directory and install the required dependencies for both the client and server.\n\n      ```bash\n      yarn install\n      ```\n\n   2. Start both server and frontend: To start both the backend and frontend at the same time, run the dev script from your root project directory. This will run the server (Express API) and the frontend (React app) concurrently.\n\n      ```bash\n      yarn dev\n      ```\n\n2. Build the Application for Production\n\n   To create a production build of the app (both frontend and backend), run:\n\n   ```bash\n   yarn build\n   ```\n\n   After building the app, you can start both the server and frontend in production mode using:\n\n   ```bash\n   yarn start\n   ```\n\n3. Generate VAPID Keys for Web Push\n\n   First, navigate to server directory and run the command:\n\n   ```bash\n   npx web-push generate-vapid-keys\n   ```\n\n4. ENV\n\n   Create `.env` file for both client and server. See examples:\n\n   [Frontend ENV](client/.env.example)\n\n   [Backend ENV](server/.env.example)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedsamara%2Freact-frontend-optimization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamedsamara%2Freact-frontend-optimization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedsamara%2Freact-frontend-optimization/lists"}