npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-template-ts-firebase-gmap

v0.0.1

Published

React Native Template with TS, Firebase, Google Maps, Navigation, Vector Icons, ...

Downloads

5

Readme

react-native-ts-fb-template

React Native Template (RN 0.69.5)

Because of some dependency issues in pods, it's always hard and tricky to import Firebase and GoogleMaps and other services along together in one app, also configuring Navigation, vector-icons, redux and some helpful services will always take time, so basically that's why I created this template


Feedback and comments are always welcome

Of course, this isn't the perfect structure, but It's inspired by NextJS and recommended typescript structure, which will separate components in terms of features, and root pages with some Navigation (which won't be present in NextJS based on its directory routing), and separating services and have wrappers to handle better future changes in dependencies So Please don't hesitate to send me comments and feedback. we can talk about each part and make it better.


Instructions

  • Init react-native project with template
react-native init [project-name] --template https://github.com/MasoudAlali/react-native-ts-fb-template

Configure Firebase

  • Configure your project in Firebase Console
  • Download your GoogleService-Info.plist and replace (overwrite) it in ios directory
  • Download your google-services.json and replace (overwrite) it in android/app directory

Note that we are using 'analytics', 'messaging', 'performance', 'crashlytics' modules you can add or remove any module based on RN Firebase documentation

  • for more information about firebase module and how to remove it refer to Firebase Doc

Configure Google Maps

  • Configure your project in Google Cloud Panel

    • Be sure that you enable Android Maps SDK and iOS Maps SDK
  • Replace retrieved token and replace to below files:

    • [28] "GOOGLE_MAPS_API_KEY" in android/src/main/AndroidManifest.xml
    • [37] "GOOGLE_MAPS_API_KEY" in ios/[project-name]/AppDelegate.mm
  • for more information about Google Maps module and how to remove it refer to GoogleMaps Doc

Configure Vector Icons

  • For adding or removing fonts just change [85] iconFontNames in android/app/build.gradle

Configure endpoints

  • To use auth service requests (login, refreshToken)[^1] you can set your endpoints in config/urlConfigs.ts -> apiEndpoints and set baseApiUrl
  • To handle your own logic of login and refreshToken you can modify methods in api/authRequests.ts

Build App

It's base on Fastlane which is simply ruby tool to automate some tasks, it also supports lots of plugins, so you can integrate it easily to different services

  • iOS build:
[bundle exec] fastlane ios build
  • Android build:
[bundle exec] fastlane android build

Provided Services

Keep in mind that all services are singleton, so default exports are instance of class

  • Some services are just wrapper for another library or tool, so the idea is that if you wanted to do some logging or changing base libraries, you don't need to change your whole application in different parts to remove or change something, just change this wrapper service and that's it
For read more about services and details please refer to Services

[^1]: It's simple username, password, captcha values and refreshToken is simply sending token and refreshToken to renew token