{"id":15383181,"url":"https://github.com/wangrunlin/strapi-nextjs-corporate-starter","last_synced_at":"2025-04-03T20:18:03.062Z","repository":{"id":200863772,"uuid":"706390236","full_name":"wangrunlin/strapi-nextjs-corporate-starter","owner":"wangrunlin","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-17T22:51:58.000Z","size":24058,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T08:31:19.721Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://strapi-nextjs-corporate-starter-six-rust.vercel.app","language":"TypeScript","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/wangrunlin.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}},"created_at":"2023-10-17T21:17:39.000Z","updated_at":"2023-10-17T22:50:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"49d074e9-d59a-4626-935d-d6c5af53df6f","html_url":"https://github.com/wangrunlin/strapi-nextjs-corporate-starter","commit_stats":null,"previous_names":["wangrunlin/strapi-nextjs-corporate-starter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangrunlin%2Fstrapi-nextjs-corporate-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangrunlin%2Fstrapi-nextjs-corporate-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangrunlin%2Fstrapi-nextjs-corporate-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangrunlin%2Fstrapi-nextjs-corporate-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangrunlin","download_url":"https://codeload.github.com/wangrunlin/strapi-nextjs-corporate-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247070927,"owners_count":20878586,"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-10-01T14:35:48.269Z","updated_at":"2025-04-03T20:18:03.040Z","avatar_url":"https://github.com/wangrunlin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Strapi Starter Next 13, Tailwind, Typescript and Strapi\n\nnote: This project was started with love by [Trecia](https://github.com/TreciaKS), [Daniel](https://github.com/malgamves) and [Paul](https://github.com/PaulBratslavsky). We were all new to Next 13 and Typescript. If you find any bugs or improvements feel free to create an issue. Thank you all for your support and participation.\n\n![demo-site](https://user-images.githubusercontent.com/6153188/231865321-0da5e81f-4832-4cce-bcd1-ecd79e9b9cc3.gif)\n\nIf you prefer videos that guide you therought the setup process you can find them [here](https://github.com/strapi/nextjs-corporate-starter/issues/71)\n\n## Getting Started\n\n1. Clone the repository locally:\n\n```bash\n  git clone https://github.com/strapi/nextjs-corporate-starter.git\n    or\n  gh repo clone strapi/nextjs-corporate-starter\n```\n\n2. Run `setup` command to setup frontend and backend dependencies:\n\n```bash\n  yarn setup\n```\n\n3. Next, navigate to your `/backend` directory and set up your `.env` file. You can use the `.env.example` file as reference:\n\n```bash\nHOST=localhost\nPORT=1337\nAPP_KEYS=\"toBeModified1,toBeModified2\"\nAPI_TOKEN_SALT=tobemodified\nADMIN_JWT_SECRET=tobemodified\nJWT_SECRET=tobemodified\nTRANSFER_TOKEN_SALT=tobemodified\n```\n\n4. Start your project by running the following command:\n\n```bash\n  yarn build\n  yarn develop\n```\n\nYou will be prompted to create your first admin user.\n\n![admin-user](https://user-images.githubusercontent.com/6153188/231865420-5f03a90f-b893-4057-9634-9632920a7d97.gif)\n\nGreat. You now have your project running. Let's add some data.\n\n## Seeding The Data\n\nWe are going to use our DEITS feature which will alow to easily import data into your project.\n\nYou can learn more about it in our documentation [here](https://docs.strapi.io/dev-docs/data-management).\n\nIn the root of our project we have our `seed-data.tar.gz` file. We will use it to seed our data.\n\n1. Open up your terminal and make sure you are still in you `backend` folder.\n\n2. Run the following command to seed your data:\n\n```bash\n  yarn strapi import -f ../seed-data.tar.gz\n```\n\n![after-import](https://user-images.githubusercontent.com/6153188/231865491-05cb5818-a0d0-49ce-807e-a879f7e3070c.gif)\n\nThis will import your data locally. Log back into your admin panel to see the newly imported data.\n\nHere is a quick video covering initial setup and data seeding.\n\nhttps://github.com/strapi/nextjs-corporate-starter/assets/6153188/80f00bf5-d17b-449d-8a0d-7f0d9614f40b\n\n## Setting Up The Frontend\n\nNext we need to switch to our `/frontend` directory and create our `.env` file and paste in the following. \n\n```bash\nNEXT_PUBLIC_STRAPI_API_TOKEN=your-api-token\nNEXT_PUBLIC_PAGE_LIMIT=6\nNEXT_PUBLIC_STRAPI_FORM_SUBMISSION_TOKEN=your-form-submission-token\nNEXT_PUBLIC_STRAPI_API_URL=http://localhost:1337\n\n```\n\nBefore starting our Next JS app we need to go inside our Strapi Admin and create two tokens that we will be using for **form submission** and displaying our **content**.\n\nInside your Strapi Admin Panel navigate to Settings -\u003e API Tokens and click on the `Create new API Token`.\n\n![api-tokens](https://user-images.githubusercontent.com/6153188/231865572-cebc5538-374c-4050-91cd-c303fae25a3d.png)\n\nHere are our Token Settings\n\nName: Public API Token Content\nDescription: Access to public content.\nToken duration: Unlimited\nToken type: Custom\n\nIn Permissions lets give the following access.\n\n| Content         |   Permissions    |\n| --------------- | :--------------: |\n| Article         | find and findOne |\n| Author          | find and findOne |\n| Category        | find and findOne |\n| Global          |       find       |\n| Page            | find and findOne |\n| Product-feature | find and findOne |\n\n![permissions](https://user-images.githubusercontent.com/6153188/231865625-a3634d89-0f40-4a6d-a356-8f654abd88b9.gif)\n\nOnce you have your token add it to your `NEXT_PUBLIC_STRAPI_API_TOKEN` variable name in the `.env` file.\n\n**Alternatively:** you can create a READ only Token that will give READ permission to all your endpoints.\n\nIn this particular project this is not an issue. Although the above is the recommended way, just wanted to show you this option here as well.\n\nWhen creating a Token, just select the `Read-only` option from token type drop down.\n\n\u003cimg width=\"1093\" alt=\"create-read-only-token\" src=\"https://github.com/strapi/nextjs-corporate-starter/assets/6153188/3ea6c029-b296-4bbc-a5ce-33eedac52a03\"\u003e\n\nNext create a token that will allow us to submit our form.\n\nName: Public API Form Submit\nDescription: Form Submission.\nToken duration: Unlimited\nToken type: Custom\n\nIn Permissions lets give the following access.\n\n| Content              | Permissions |\n| -------------------- | :---------: |\n| Lead-Form-Submission |   create    |\n\nAdd your token to your `NEXT_PUBLIC_STRAPI_FORM_SUBMISSION_TOKEN` variable name in the `.env` file.\n\nOnce your environment variables are set you can start your frontend application by running `yarn dev`.\n\nYou should now see your Next JS frontend.\n\n![frontend](https://user-images.githubusercontent.com/6153188/231865662-d870051f-4503-4a01-bc6b-635c7c5ca40d.png)\n\n## Start Both Projects Concurrently\n\nWe can also start both projects with one command using the `concurrently` package.\n\nYou can find the setting inside the `package.json` file inside the root folder.\n\n```json\n{\n  \"scripts\": {\n    \"frontend\": \"yarn dev --prefix ../frontend/\",\n    \"backend\": \"yarn dev --prefix ../backend/\",\n    \"clear\": \"cd frontend \u0026\u0026 rm -rf .next \u0026\u0026 rm -rf cache\",\n    \"setup:frontend\": \"cd frontend \u0026\u0026 yarn\",\n    \"setup:backend\": \"cd backend \u0026\u0026 yarn\",\n    \"setup\": \"yarn install \u0026\u0026 yarn setup:frontend \u0026\u0026 yarn setup:backend\",\n    \"dev\": \"yarn clear \u0026\u0026 concurrently \\\"cd frontend \u0026\u0026 yarn dev\\\" \\\"cd backend \u0026\u0026 yarn develop\\\"\"\n  },\n  \"dependencies\": {\n    \"concurrently\": \"^7.6.0\"\n  }\n}\n```\n\nYou can start both apps by running `yarn dev`.\n\n## Conclusion\n\nHope you find this starter useful, it is a bare-bone example to help you get started quickly.\n\nWould love to hear what you will build using it.\n\nIf you find bugs or have suggestions feel free to create issues.\n\nThank you and stay awesome.\n\n# Contributing to the Next.js Corporate Starter repository\n\nWe're so excited that you're thinking about contributing to the Next.js Corporate Starter open-source project! If you're unsure or afraid of anything, just know that you can't mess up here. Any contribution is valuable, and we appreciate you!\n\nThis document aims to provide all the necessary information for you to make a contribution.\n\n## Prerequisites\n\nBefore you can contribute, you need to have the following installed:\n\n- Node.js and npm: You can download these from the official [Node.js website](https://nodejs.org/).\n- Git: You can find installation instructions for Git in the official [Git Book](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).\n\n## Steps to Contribute\n\n### 1. Fork the Repository\n\nIn your web browser, navigate to [https://github.com/strapi/nextjs-corporate-starter](https://github.com/strapi/nextjs-corporate-starter). Click the 'Fork' button in the upper right-hand corner of the page. This creates a copy of the repository in your GitHub account.\n\n### 2. Clone your Fork\n\nNow, go to your version of the repository. You can do this by navigating to https://github.com/USERNAME/nextjs-corporate-starter (replace 'USERNAME' with your GitHub username). Here, click the 'Clone' button and then 'Copy to clipboard' to copy the git URL.\n\nNext, you need to open your terminal, navigate to where you want to store the project, and type the following command, followed by 'Enter':\n\n```bash\ngit clone PASTE_CLONED_REPOSITORY_URL\n```\n\nReplace 'PASTE_CLONED_REPOSITORY_URL' with the URL you copied earlier. This command downloads your fork to your computer.\n\n### 3. Add Upstream Repository\n\nBefore you can start contributing, you have to set up a reference to the original repository. You can do this with the following command:\n\n```bash\ngit remote add upstream https://github.com/strapi/nextjs-corporate-starter.git\n```\n\nThis command adds a new remote, named 'upstream', that points to the original repository.\n\n### 4. Synchronize your Fork\n\nBefore you start making changes, you should synchronize your forked repository with the latest changes from the upstream. Here are the steps:\n\na. Fetch the branches and their respective commits:\n\n```bash\ngit fetch upstream\n```\n\nb. Checkout to the main branch of your fork:\n\n```bash\ngit checkout main\n```\n\nc. Merge changes from the upstream's main branch into your local main branch:\n\n```bash\ngit merge upstream/main\n```\n\nThis brings your fork's main branch into sync with the upstream repository, without losing your local changes.\n\n### 5. Create a Branch\n\nWhen you're making a contribution, it's best to make your changes in a new branch instead of the main branch. You can create a new branch and switch to it using the following command:\n\n```bash\ngit checkout -b BRANCH_NAME\n```\n\nReplace 'BRANCH_NAME' with a name that describes the change you're planning to make.\n\n### 6. Make your Changes\n\nNow, you can start making changes to the project. Feel free to make changes that you think will enhance the project.\n\n### 7. Commit your Changes\n\nWhen you've made your changes, you need to commit them. This is like creating a save point in a game. You can do this using the following commands:\n\n```bash\ngit add -A\ngit commit -m \"Your detailed commit message\"\n```\n\nReplace \"Your detailed commit message\" with a description of the changes you made.\n\n### 8. Push your Changes\n\nAfter committing your changes, you need to push them to your forked repository on GitHub. You can do this with the following command:\n\n```bash\ngit push origin BRANCH_NAME\n```\n\nReplace 'BRANCH_NAME' with the name of the branch you created earlier.\n\n### 9. Create a Pull Request\n\nAfter you've pushed your changes, you're ready to create a pull request (PR). Navigate to your forked repository in your web browser and click on 'Pull request' (near the top of the page), then on 'New pull request'. Ensure that the base fork is the original repository and the base is 'main', and that the head fork is your fork and the compare is the branch you created.\n\nEnter a title for your PR and describe the changes you made. Once you're ready, click 'Create pull request'.\n\n### Congrats! 🎉\n\nYou've just made a contribution to the Next.js Corporate Starter project! The team will review your changes and may suggest some modifications or improvements. Once your changes have been approved, they will be merged into the main codebase.\n\nThank you for your contribution. We appreciate you!\n\nRemember, everyone was new to open-source at some point. If you're unsure about something, don't hesitate to ask for help. Good luck and happy hacking!\n\n### Psst...\n\nIf you find yourself contributing frequently, we've provided a script in the package.json to help keep your local project synchronized with the main branch of the upstream (original) project. Simply execute the following command:\n\n```bash\nyarn repo:upstream\n```\n\n## FAQ\n\n### How do I add additional pages?\nCheck out [this video](https://youtu.be/EoVrTNA3geM) where I will guide on how to do this. \n\n### How do I update my Strapi version?\nCheck out this [this issue comment](https://github.com/strapi/nextjs-corporate-starter/issues/17#issuecomment-1558149967)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangrunlin%2Fstrapi-nextjs-corporate-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangrunlin%2Fstrapi-nextjs-corporate-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangrunlin%2Fstrapi-nextjs-corporate-starter/lists"}