{"id":20976317,"url":"https://github.com/paradoxinversion/paradox-inversion","last_synced_at":"2025-03-13T09:19:40.732Z","repository":{"id":42352445,"uuid":"166599142","full_name":"paradoxinversion/paradox-inversion","owner":"paradoxinversion","description":"Repo for Paradox Inversion","archived":false,"fork":false,"pushed_at":"2022-12-10T17:19:27.000Z","size":3343,"stargazers_count":1,"open_issues_count":24,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-20T05:50:04.864Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://paradoxinversion.com","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/paradoxinversion.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}},"created_at":"2019-01-19T22:15:45.000Z","updated_at":"2021-09-02T23:15:42.000Z","dependencies_parsed_at":"2023-01-26T06:46:20.096Z","dependency_job_id":null,"html_url":"https://github.com/paradoxinversion/paradox-inversion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paradoxinversion%2Fparadox-inversion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paradoxinversion%2Fparadox-inversion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paradoxinversion%2Fparadox-inversion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paradoxinversion%2Fparadox-inversion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paradoxinversion","download_url":"https://codeload.github.com/paradoxinversion/paradox-inversion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243374613,"owners_count":20280707,"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-19T04:52:41.974Z","updated_at":"2025-03-13T09:19:40.713Z","avatar_url":"https://github.com/paradoxinversion.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Paradox Inversion\n\nThe API is driven by Keystonejs (for CMS functionality) and Nextjs (for React/SSR implementation).\n\nThis repo is largely for (Jedai's) personal use, but has reached a stage at which it might be useful for anyone trying to make a similar blog without having to do too much tweaking.\n\n## Environment\n\nSome PI configuration is handled via envrionment variables. The project uses dotenv, so a .env file should be present on machines running the software. Copy or create a new `.env.` file with the values from `.env.example`, replacing values with your own as necessary.\n\n## Developing\n\nEnsure MongoDB is running and Port 3000 is is not in use. To start developing, execute `yarn start:dev`. This will instantiate Keystone, connect to the database, and prepare GraphQL.\n\nRestarting the server will be necessary when making any changes to Keystone (such has changing Keystone Lists). Changes to Keystone lists may break existing items unless changed values are properly handled (ie, migrated). See Keystone5 documentation for more details.\n\n## Building and Running for Production\n\nTo build the site, run `yarn run build`. A `dist` directory will be created in the project root if there are no errors.\n\nRun the project with `yarn start`.\n\n### Remote Server Run\n\nEnsure the machine has `forever.js` installed globally and that it is available to the user running the instance. Ensure that mongo is running and execute `forever start -c \"yarn start\" ./dist`.\n\n## Scripts\n\n**start**: Run the built Keystone isntance in production mode.\n\n**start:dev**: Run the development server.\n\n**build**: Build the project for production.\n\n## Deployment (Manual)\n\nSSH to remote machine, enter credentials\n\nNavigate to remote paradox-inversion deployment folder.\n\n`git pull` the latest version of the `deploy` branch. Ensure dependencies are up to date.\n\nBuild the project with `yarn run build`.\n\n## Site Routes\n\n`/`\n\nMain page\n\n`/:page`\n\nA ‘top level’ page (ie, fiction, tech, etc)\n\n`/series/:storyName`\n\nThe landing page for a series, containing all ordered parts\n\n`/posts/:searchtype/:query`\n\nGets all posts matching a search type and query—\nSearch Types: [page, category, series, tag(ged?) ]\n\n`/post/:year/:month/:day/:slug`\n\nReturns a single post\n\n## Keystone\n\n(This section is under heavy construction)\n\n### Access Control\n\nFor most lists, only a logged-in user can create, update, or delete entries. This setup also there is one user (me :)), who is also the administrator. You may want to tweak that if you intend to use this as a basis for a site with multiple account-holding users.\n\n### Common Fields\n\n#### Url\n\nA sluggified version of the title or name of the item. Should be unique at certain levels, but doesn't matter as much for others. For instance, it matters for pages because the URLS would clash. For posts, the date posted matters more, as posts with different dates but matching names have different (complete) urls.\n\n#### Title\n\nJust a name. Might migrate instances of lists using `name` to this for consistency.\n\n#### Social Media Brief\n\nText content that will be added to opengraph/twitter cards/etc on social media.\n\n#### State\n\nThe 'post state' of the item-- Draft (working on it, not visible to public), Published (done, visible to public).\n\n### Categories\n\n#### Access\n\nLogged In: C, U, D\n\nAll: R\n\n#### Fields\n\n- url\n- name\n- description\n\n### Pages\n\nPages are the basic grouping mechanism of content. Pages have the following fields\n\n- url\n- title\n- socialMediaBrief\n- pageOrder\n- content\n- postSections\n- state\n- shownInNav\n\n#### Name\n\nThe name of the page. This is also slugified\n\n#### Page Order\n\nThe order (from left to right) in which the page should appear in the header, ascending.\n\n#### Page Post Sections\n\nA two-word string indicating what posts the page should pull. The first word is the type of of post to search for (page|category|series|tag(ged?)). The second word is the query. For values that are referenced from lists (such as category) the query must match a valid existing option.\n\n#### Page Type\n\nThe type of page it is\n\n### Posts\n\nPosts are any content added to the site. Their sent from the server as HTML strings which are rendered via react.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparadoxinversion%2Fparadox-inversion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparadoxinversion%2Fparadox-inversion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparadoxinversion%2Fparadox-inversion/lists"}