Documentation

Here you should find everything you need from getting started with creating your Profile to more advanced topics. We welcome contributions, check out the LinkFree Repo  and the documentation source on GitHub for more information.

Environment variables

Environment variables are needed in the .env file to allow the application to run correctly. .env.example file has an example template you can use to get started. However, you will need to follow these steps to get your GitHub OAuth environment variables.

variableexamplerequireddescription
LINKFREE_MONGO_CONNECTION_STRINGmongodb://localhost:27017/linkfreetrueDatabase connection string
NEXT_PUBLIC_GA_MEASUREMENT_ID-falseGoogle analytics id
NEXT_PUBLIC_BASE_URLhttp://localhost:3000trueHosting url
NODE_ENVdevelopmenttrue-
GITHUB_IDabcedfghil12345trueGitHub OAuth ID
GITHUB_SECRETa1b2c3e4f5e6trueGitHub OAuth Secret
NEXTAUTH_SECRETafsfdsafadsftrueNext Auth Secret, this can be any random characters

GitHub OAuth

  1. Go to your profile `settings``
  2. Then Developer settings down the bottom left
  3. Click New OAuth app and fill in the form details
Form fieldvalue
Application nameLinkFree local
Homepage URLhttp://linkfree.eddiehub.io
Application descriptionOpen Source alternative to LinkTree
Authorization callback URLhttp://localhost:3000/api/auth/callback/github

Then use the generated Client ID and Client Secret in the .env.

Full details on GitHub docs https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app