Skip to content

Remote Database Project using Google Cloud and Firebase

License

Notifications You must be signed in to change notification settings

StefRuseva88/firestore-demo

Repository files navigation

Remote Databases Project with Firebase

JavaScript C# .NET Firebase

This is a test project for Front-End Technologies May 2024 Course @ SoftUni


About

This repository showcases the integration of Firebase Firestore (Cloud Firestore) for a responsive login form, with demos using both JavaScript and C#. It demonstrates CRUD (Create, Read, Update, Delete) operations with a remote database using Firebase, providing a practical example of database management in front-end and back-end projects.

Key Features

  • Responsive Login Form: A form that adjusts smoothly across different screen sizes.
  • Firebase Firestore Integration: Real-time database operations via Firebase, with both JavaScript and C# demos.
  • CRUD Operations: Demonstrates creating, reading, updating, and deleting documents in a Firestore database.

Prerequisites

To work with this project, ensure you have the following set up:

Installation

Firebase Setup

  1. Create a Firebase Project:
  • Go to the Firebase Console.
  • Click "Add project" and follow the setup instructions.
  • Once the project is created, enable Firestore under the Database section.
  1. Configure Firebase Firestore Rules: Firestore security rules determine who can read or write to your database. Initially, Firebase locks these rules, preventing external access. To allow public access for testing purposes (you may restrict these later), follow these steps:
  • Navigate to the Firestore tab in your Firebase project.
  • Under the Rules section, modify the security rules to allow read and write access to all users:
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if true;
    }
  }
}
  • Note: This rule allows unrestricted access to the database. Make sure to update the rules in production environments for security purposes.
  1. Set up Firebase Configuration in Your Project:
  • Go to the Firebase Console and open your project settings.
  • Under the "General" tab, you’ll find the Firebase SDK configuration snippets.
  • Copy the JavaScript Firebase config object or the google-services.json file (for .NET) to your project and initialize Firebase.

Content:

This project contains two Firebase Firestore integration demos:

  • JavaScript Demo: Demonstrates how to use Firebase Firestore in a web-based JavaScript application to perform real-time CRUD operations.
  • C# Demo: Showcases how to integrate Firebase Firestore in a C# console application for similar database interactions.

Contributing

Contributions are welcome! If you have any improvements or bug fixes, feel free to open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or suggestions, please open an issue in the repository.

About

Remote Database Project using Google Cloud and Firebase

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published