{"id":15690610,"url":"https://github.com/revskill10/next-template","last_synced_at":"2025-04-13T18:38:01.458Z","repository":{"id":33379904,"uuid":"152632675","full_name":"revskill10/next-template","owner":"revskill10","description":"A modular web boilerplate","archived":false,"fork":false,"pushed_at":"2025-03-24T20:25:08.000Z","size":785,"stargazers_count":7,"open_issues_count":37,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T09:21:22.049Z","etag":null,"topics":["apollo-client","graphql","graphql-yoga","immer","jest","material-ui","nextjs","nodejs","reactjs","redux"],"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/revskill10.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-11T17:50:47.000Z","updated_at":"2025-03-16T16:56:00.000Z","dependencies_parsed_at":"2023-01-15T00:40:19.958Z","dependency_job_id":"6cbd0b2d-7163-49c9-9106-d3e569698bd7","html_url":"https://github.com/revskill10/next-template","commit_stats":{"total_commits":225,"total_committers":3,"mean_commits":75.0,"dds":"0.14222222222222225","last_synced_commit":"daa044fd0cc31afa855adcaccdea85f9431c18e6"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revskill10%2Fnext-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revskill10%2Fnext-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revskill10%2Fnext-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revskill10%2Fnext-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/revskill10","download_url":"https://codeload.github.com/revskill10/next-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248762542,"owners_count":21157748,"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":["apollo-client","graphql","graphql-yoga","immer","jest","material-ui","nextjs","nodejs","reactjs","redux"],"created_at":"2024-10-03T18:12:44.953Z","updated_at":"2025-04-13T18:38:01.439Z","avatar_url":"https://github.com/revskill10.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/revskill10/next-template.svg?branch=master)](https://travis-ci.com/revskill10/next-template)\n[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/revskill10/next-template)\n\n## This project is deprecated.\n\nThis project was just an experiment on how to achieve modular architecture with Next.js and Graphql. But it's not good enough.\nIn case you want a similar setup, just use Next.js 10 with multi-zone support.\n\n## Installation\n\n```\ncurl https://sh.rustup.rs -sSf | sh\nrustup toolchain add nightly\nrustup target add wasm32-unknown-unknown --toolchain nightly\n\ncargo install cargo-wasm\ncargo wasm new \u003cproject_name\u003e\ncargo wasm build\n```\n\n## Style guide\n\n\n- Create unique index for upserting\n\n```sql\nALTER TABLE the_table ADD CONSTRAINT constraint_name UNIQUE (column1, column2);\n```\n\nReload metadata\n\n\n### Generate Vapid keys\n\n```js\nnpm i -g web-push\nweb-push generate-vapid-keys\n```\n\n### Filestack api key\n\n```\n{\n  viewer {\n    project(id:\"1809351104c047e5be6a8e3fcc9931d2\") {\n        stage(name:\"master\") {\n        assetConfig {\n          apiKey\n        }\n      }\n    }\n  }\n}\n```\n\n- Select columns of a table\n\n```sql\nSELECT column_name\nFROM information_schema.columns\nWHERE table_schema = 'public'\n  AND table_name   = 'table_name'\n```\n\n- Timesstamp trigger\n\n```sql\nCREATE OR REPLACE FUNCTION trigger_set_timestamp()\nRETURNS TRIGGER AS $$\nBEGIN\n  NEW.updated_at = NOW();\n  RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;\n\nCREATE TRIGGER set_timestamp\nBEFORE UPDATE ON table_name\nFOR EACH ROW\nEXECUTE PROCEDURE trigger_set_timestamp();\n```\n\n\n## GraphQL\n\nOnly use `graphql-tag` to write Graphql Query.\n\n## Get all columns and datatypes, nullability of schema/table\n\n```sql\nSELECT\n    \"pg_attribute\".attname                                                    as \"column\",\n    pg_catalog.format_type(\"pg_attribute\".atttypid, \"pg_attribute\".atttypmod) as \"datatype\",\n\n    not(\"pg_attribute\".attnotnull) AS \"nullable\"\nFROM\n    pg_catalog.pg_attribute \"pg_attribute\"\nWHERE\n    \"pg_attribute\".attnum \u003e 0\n    AND NOT \"pg_attribute\".attisdropped\n    AND \"pg_attribute\".attrelid = (\n        SELECT \"pg_class\".oid\n        FROM pg_catalog.pg_class \"pg_class\"\n            LEFT JOIN pg_catalog.pg_namespace \"pg_namespace\" ON \"pg_namespace\".oid = \"pg_class\".relnamespace\n        WHERE\n            \"pg_namespace\".nspname = 'public'\n            AND \"pg_class\".relname = 'sche_students'\n    );\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevskill10%2Fnext-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevskill10%2Fnext-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevskill10%2Fnext-template/lists"}