{"id":34827444,"url":"https://github.com/profullstack/upvotocracy-ui-ssr","last_synced_at":"2026-03-16T12:30:59.156Z","repository":{"id":40839248,"uuid":"253940517","full_name":"profullstack/upvotocracy-ui-ssr","owner":"profullstack","description":"Free speech Reddit clone","archived":false,"fork":false,"pushed_at":"2023-10-19T10:37:29.000Z","size":15741,"stargazers_count":14,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-18T09:45:57.968Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://upvotocracy.com","language":"Svelte","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/profullstack.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}},"created_at":"2020-04-08T00:01:35.000Z","updated_at":"2024-03-03T15:15:46.000Z","dependencies_parsed_at":"2023-02-05T04:01:49.074Z","dependency_job_id":null,"html_url":"https://github.com/profullstack/upvotocracy-ui-ssr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/profullstack/upvotocracy-ui-ssr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fupvotocracy-ui-ssr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fupvotocracy-ui-ssr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fupvotocracy-ui-ssr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fupvotocracy-ui-ssr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/profullstack","download_url":"https://codeload.github.com/profullstack/upvotocracy-ui-ssr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fupvotocracy-ui-ssr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28031593,"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","status":"online","status_checked_at":"2025-12-25T02:00:05.988Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-12-25T15:21:41.983Z","updated_at":"2025-12-25T15:21:42.600Z","avatar_url":"https://github.com/profullstack.png","language":"Svelte","readme":"# upvotocracy-ui-ssr\n\nLive site at [upvotocracy.com](https://upvotocracy.com)\n\nUpvotocracy is an open source reddit clone.\n\n\n# sapper-template\n\nThe default [Sapper](https://github.com/sveltejs/sapper) template, available for Rollup and webpack.\n\n\n## Getting started\n\n\n### Using `degit`\n\n[`degit`](https://github.com/Rich-Harris/degit) is a scaffolding tool that lets you create a directory from a branch in a repository. Use either the `rollup` or `webpack` branch in `sapper-template`:\n\n```bash\n# for Rollup\nnpx degit \"sveltejs/sapper-template#rollup\" my-app\n# for webpack\nnpx degit \"sveltejs/sapper-template#webpack\" my-app\n```\n\n\n### Using GitHub templates\n\nAlternatively, you can use GitHub's template feature with the [sapper-template-rollup](https://github.com/sveltejs/sapper-template-rollup) or [sapper-template-webpack](https://github.com/sveltejs/sapper-template-webpack) repositories.\n\n\n### Running the project\n\nHowever you get the code, you can install dependencies and run the project in development mode with:\n\n```bash\ncd my-app\nnpm install # or yarn\nnpm run dev\n```\n\nOpen up [localhost:3000](http://localhost:3000) and start clicking around.\n\nConsult [sapper.svelte.dev](https://sapper.svelte.dev) for help getting started.\n\n\n## Structure\n\nSapper expects to find two directories in the root of your project —  `src` and `static`.\n\n\n### src\n\nThe [src](src) directory contains the entry points for your app — `client.js`, `server.js` and (optionally) a `service-worker.js` — along with a `template.html` file and a `routes` directory.\n\n\n#### src/routes\n\nThis is the heart of your Sapper app. There are two kinds of routes — *pages*, and *server routes*.\n\n**Pages** are Svelte components written in `.svelte` files. When a user first visits the application, they will be served a server-rendered version of the route in question, plus some JavaScript that 'hydrates' the page and initialises a client-side router. From that point forward, navigating to other pages is handled entirely on the client for a fast, app-like feel. (Sapper will preload and cache the code for these subsequent pages, so that navigation is instantaneous.)\n\n**Server routes** are modules written in `.js` files, that export functions corresponding to HTTP methods. Each function receives Express `request` and `response` objects as arguments, plus a `next` function. This is useful for creating a JSON API, for example.\n\nThere are three simple rules for naming the files that define your routes:\n\n* A file called `src/routes/about.svelte` corresponds to the `/about` route. A file called `src/routes/blog/[slug].svelte` corresponds to the `/blog/:slug` route, in which case `params.slug` is available to the route\n* The file `src/routes/index.svelte` (or `src/routes/index.js`) corresponds to the root of your app. `src/routes/about/index.svelte` is treated the same as `src/routes/about.svelte`.\n* Files and directories with a leading underscore do *not* create routes. This allows you to colocate helper modules and components with the routes that depend on them — for example you could have a file called `src/routes/_helpers/datetime.js` and it would *not* create a `/_helpers/datetime` route\n\n\n### static\n\nThe [static](static) directory contains any static assets that should be available. These are served using [sirv](https://github.com/lukeed/sirv).\n\nIn your [service-worker.js](src/service-worker.js) file, you can import these as `files` from the generated manifest...\n\n```js\nimport { files } from '@sapper/service-worker';\n```\n\n...so that you can cache them (though you can choose not to, for example if you don't want to cache very large files).\n\n\n## Bundler config\n\nSapper uses Rollup or webpack to provide code-splitting and dynamic imports, as well as compiling your Svelte components. With webpack, it also provides hot module reloading. As long as you don't do anything daft, you can edit the configuration files to add whatever plugins you'd like.\n\n\n## Production mode and deployment\n\nTo start a production version of your app, run `npm run build \u0026\u0026 npm start`. This will disable live reloading, and activate the appropriate bundler plugins.\n\nYou can deploy your application to any environment that supports Node 10 or above. As an example, to deploy to [ZEIT Now](https://zeit.co/now) when using `sapper export`, run these commands:\n\n```bash\nnpm install -g now\nnow\n```\n\nIf your app can't be exported to a static site, you can use the [now-sapper](https://github.com/thgh/now-sapper) builder. You can find instructions on how to do so in its [README](https://github.com/thgh/now-sapper#basic-usage).\n\n\n## Using external components\n\nWhen using Svelte components installed from npm, such as [@sveltejs/svelte-virtual-list](https://github.com/sveltejs/svelte-virtual-list), Svelte needs the original component source (rather than any precompiled JavaScript that ships with the component). This allows the component to be rendered server-side, and also keeps your client-side app smaller.\n\nBecause of that, it's essential that the bundler doesn't treat the package as an *external dependency*. You can either modify the `external` option under `server` in [rollup.config.js](rollup.config.js) or the `externals` option in [webpack.config.js](webpack.config.js), or simply install the package to `devDependencies` rather than `dependencies`, which will cause it to get bundled (and therefore compiled) with your app:\n\n```bash\nnpm install -D @sveltejs/svelte-virtual-list\n```\n\n\n## Bugs and feedback\n\nSapper is in early development, and may have the odd rough edge here and there. Please be vocal over on the [Sapper issue tracker](https://github.com/sveltejs/sapper/issues).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofullstack%2Fupvotocracy-ui-ssr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprofullstack%2Fupvotocracy-ui-ssr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofullstack%2Fupvotocracy-ui-ssr/lists"}