This system allows for the generation of dynamic links using the Firebase Dynamic Links API. The generated links can be used for sharing and directing users to specific content in mobile apps and on the web.
- Node.js
- Next.js
- React
- Firebase Project with Firebase Dynamic Links enabled
-
Firebase Project: Ensure you have a project set up in the Firebase Console and that Firebase Dynamic Links is enabled for this project.
-
API Key: Obtain the Firebase API key from the Firebase Console, which is necessary to authenticate requests to the Firebase Dynamic Links API.
-
Dynamic Link Domain: Register a dynamic link domain in the Firebase Console and configure it as needed.
-
Development Environment: Set up a
.env.local
file at the root of your Next.js project to store API keys and other sensitive information.FIREBASE_API_KEY=YOURKEY FIREBASE_DYNAMIC_LINK=YOUR FIREBASE DYNAMIC LINK DOMAIN
MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era. This example will show you how to connect to and use MongoDB as your backend for your Next.js app.
npm dependencies by running:
npm install
Set up a MongoDB database either locally or with MongoDB Atlas for free.
Copy the env.local.example
file in this directory to .env.local
(which will be ignored by Git):
cp .env.local.example .env.local
Set each variable on .env.local
:
MONGODB_URI
- Your MongoDB connection string. If you are using MongoDB Atlas you can find this by clicking the "Connect" button for your cluster.
npm install
npm run dev
# or
yarn install
yarn dev