https://github.com/simran1002/realtime-sms
This project is a Node.js application that interacts with Firebase to fetch and format SMS data from Firebase Realtime Database and provides an API to sum up all amounts in the SMS collection using Firebase Cloud Functions.
https://github.com/simran1002/realtime-sms
firebase firebase-admin-sdk nodejs realtime-database
Last synced: about 2 months ago
JSON representation
This project is a Node.js application that interacts with Firebase to fetch and format SMS data from Firebase Realtime Database and provides an API to sum up all amounts in the SMS collection using Firebase Cloud Functions.
- Host: GitHub
- URL: https://github.com/simran1002/realtime-sms
- Owner: simran1002
- Created: 2024-07-21T20:37:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-24T11:05:27.000Z (almost 2 years ago)
- Last Synced: 2025-03-14T21:25:57.199Z (over 1 year ago)
- Topics: firebase, firebase-admin-sdk, nodejs, realtime-database
- Language: JavaScript
- Homepage:
- Size: 73.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Realtime SMS Project
This project is a Node.js application that interacts with Firebase to fetch and format SMS data from Firebase Realtime Database and provides an API to sum up all amounts in the SMS collection using Firebase Cloud Functions.
## Project Setup
### Prerequisites
- Node.js
- Firebase CLI
- A Firebase project
### Step 1: Clone the Repository
git clone https://github.com/simran1002/Realtime-SMS.git
cd realtime-sms
### Step 2: Install Dependencies
npm install
### Step 3: Configure Environment Variables
Create a .env file in the root of your project directory
touch .env
Add your Firebase Realtime Database URL to the .env file
### Step 4: Initialize Firebase Admin SDK
In the Firebase Console, navigate to "Project Settings" > "Service accounts" > "Generate new private key".
Download the JSON file and save it in the project directory as serviceAccountKey.json.
### Step 5: Fetch and Format SMS Data
Run the script to fetch data from the sms collection, format the timestamp, and save it to the formatted_sms collection:
Project Structure
```bash
Realtime-SMS/
│
├── .env
├── functions/
│ ├── index.js
├── serviceAccountKey.json
├── firebaseAdmin.js
├── index.js
├── package.json
└── README.md