{"id":21089881,"url":"https://github.com/combine/saga","last_synced_at":"2025-05-16T13:30:52.656Z","repository":{"id":213596645,"uuid":"120660847","full_name":"combine/saga","owner":"combine","description":"Next-generation ecommerce framework built with Node.js, GraphQL and React.","archived":false,"fork":false,"pushed_at":"2018-08-16T16:30:13.000Z","size":1630,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T01:24:58.889Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/combine.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}},"created_at":"2018-02-07T19:25:00.000Z","updated_at":"2024-06-03T02:46:45.000Z","dependencies_parsed_at":"2023-12-21T21:08:34.624Z","dependency_job_id":"f9f17344-5dab-4426-b4c9-573ce4d21fb9","html_url":"https://github.com/combine/saga","commit_stats":null,"previous_names":["combine/saga"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/combine%2Fsaga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/combine%2Fsaga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/combine%2Fsaga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/combine%2Fsaga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/combine","download_url":"https://codeload.github.com/combine/saga/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254538279,"owners_count":22087834,"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-19T21:32:32.342Z","updated_at":"2025-05-16T13:30:52.209Z","avatar_url":"https://github.com/combine.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Saga\n\nNext-generation ecommerce framework built with React and GraphQL.\n\n## Features\n\n- GraphQL server backed by apollo-server-express, Objection.js, and PostgreSQL\n- Full support for server-side rendering\n- Code splitting with [dynamic imports](https://webpack.js.org/guides/code-splitting/#dynamic-imports) and [react-loadable](https://github.com/thejameskyle/react-loadable)\n- Sane [webpack configurations](webpack/)\n- JS hot reloading with [react-hot-loader (@next)](https://github.com/gaearon/react-hot-loader) and [webpack-dev-server](https://github.com/webpack/webpack-dev-server)\n- CSS, SASS and [css-modules](https://github.com/css-modules/css-modules) support with hot reloading and no [flash of unstyled content](https://en.wikipedia.org/wiki/Flash_of_unstyled_content) ([css-hot-loader](https://github.com/shepherdwind/css-hot-loader))\n- Routing with [react-router-v4](https://github.com/ReactTraining/react-router)\n- Full production builds that do not rely on `babel-node`.\n- Pre-configured testing tools with `jest` and `enzyme` to work with css modules, static files, and aliased module paths.\n\n\n## Development Mode\n\nCopy environment variables and edit them if necessary:\n\n```\ncp .env.example .env\n```\n\nThen:\n\n```\nnpm install\nnpm start\n```\n\nDirect your browser to `http://localhost:3000`.\n\n## Production Builds\n\nAdd environment variables the way you normally would on your production system.\n\n```\nnpm run prod:build\nnpm run serve\n```\n\nOr simply:\n\n```\nnpm run prod\n```\n\nIf using Heroku, simply add a `Procfile` in the root directory. The\n[postinstall](postinstall.js) script will do the rest.\n\n```\nweb: npm run serve\n```\n\n## Path Aliases\n\nIn `package.json`, there is a property named `_moduleAliases`. This object\ndefines the require() aliases used by both webpack and node.\n\nAliased paths are prefixed with one of two symbols, which denote different\nthings:\n\n`@` - aliased paths, e.g. `@admin, @app, @middleware`\n\n`$` - server paths that are built by babel, e.g. `server/api`\n\nAliases are nice to use for convenience, and lets us avoid using relative paths\nin our components:\n\n```\n// This sucks\nimport SomeComponent from '../../../components/SomeComponent';\n\n// This is way better\nimport SomeComponent from '@shared/components/SomeComponent';\n```\n\nYou can add additional aliases in `package.json` to your own liking.\n\n## Environment Variables\n\nIn development mode, environment variables are loaded by `dotenv` off the `.env`\nfile in your root directory. In production, you'll have to manage these\nyourself.\n\nAn example with Heroku:\n\n```\nheroku config:set FOO=bar\n```\n\n## CSS Modules\n\nThis project uses [CSS Modules](https://github.com/css-modules/css-modules).\nClass names should be in `camelCase`. Simply import the .scss file into your\ncomponent, for example:\n\n```\n├── components\n│   ├── Header.js\n│   ├── Header.scss\n```\n\n```\n// Header.scss\n.headerContainer {\n  height: 100px;\n  width: 100%;\n}\n```\n\n```\n// Header.js\nimport css from './Header.scss';\n\nconst Header = (props) =\u003e {\n  return (\n    \u003cdiv className={css.headerContainer}\u003e\n      {...}\n    \u003c/div\u003e\n  );\n}\n\n```\n\n## Server-side Rendering (SSR)\n\nThis project fully supports server side rendering. See Apollo's documentation\non [server-sider rendering](https://www.apollographql.com/docs/react/features/server-side-rendering.html).\n\n## Async / Await\n\nThis project uses `async/await`, available by default in Node.js v8.x.x or\nhigher. If you experience errors, please upgrade your version of Node.js.\n\n## Testing\n\nThe default testing framework is Jest, though you can use whatever you want.\n\nTests and their corresponding files such as Jest snapshots, should be co-located\nalongside the modules they are testing, in a `spec/` folder. For example:\n\n```\n├── components\n│   ├── todos\n│   │   ├── TodoForm\n│   │   │   ├── spec\n│   │   │   │   ├── TodoForm.test.js\n│   │   │   ├── index.js\n│   │   │   ├── index.scss\n```\n\nTests can be written with ES2015, since it passes through `babel-register`.\n\n## Running Tests\n\nTo run a single test:\n\n```\nnpm test /path/to/single.test.js\n\n// Or, to watch for changes\nnpm run test:watch /path/to/single.test.js\n```\n\nTo run all tests:\n\n```\nnpm run test:all\n\n// Or, to watch for changes\nnpm run test:all:watch\n```\n\n## Running ESLint\n\n```\nnpm run lint\n```\n\nCheck the `.eslintignore` file for directories excluded from linting.\n\n## Changing the public asset path\n\nBy default, assets are built into `dist/public`. This path is then served by\nexpress under the path `assets`. This is the public asset path. In a production\nscenario, you may want your assets to be hosted on a CDN. To do so, just change\nthe `PUBLIC_ASSET_PATH` environment variant.\n\nExample using Heroku, if serving via CDN:\n\n```\nheroku config:set PUBLIC_ASSET_PATH=https://my.cdn.com\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcombine%2Fsaga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcombine%2Fsaga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcombine%2Fsaga/lists"}