Terms of Service Template
This guide explains how to set up and use the Terms of Service (ToS) template in your SSK project. The ToS page includes dynamic content such as company name, email, and other environment variables for easy configuration.
Steps to Use the Template
1. Create a ToS Page
First, create a directory for your Terms of Service page under the apps/<app-name>
folder:
Inside this file, copy the TermsOfService component code provided. This template dynamically pulls information from environment variables, such as the company name, product name, and contact email.
2. Set Environment Variables
Make sure to set the required environment variables in your .env file:
These environment variables will be used in the Terms of Service template for personalization, such as in the company name, contact email, and website.
3. Define Metadata for the ToS Page
The ToS template allows you to define custom metadata for the page. This metadata can be used for SEO and Open Graph purposes.
In the page.tsx file, define the metadata object:
This ensures the correct usage without unnecessary redefinition of metadata.
4. Customize the Content
The Terms of Service template includes sections for legal terms like User Data and Security, Prohibited Conduct, Ownership and Rights, etc. You can modify or add additional sections as needed to suit your business requirements.
5. Render the ToS Page
Finally, you can render the Terms of Service page in your application’s routing configuration. The file located at apps//tos/page.tsx will automatically be picked up by Next.js as a route.
With this guide, you can easily create a professional Terms of Service page in your project, complete with SEO optimizations and dynamic content.
Last updated