Coder Social home page Coder Social logo

opencommunitymap / communitymap-cloud-functions Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 633 KB

API and microservices of Open Community Map

Home Page: https://communitymap.online/

License: Apache License 2.0

TypeScript 87.52% Shell 12.48%
firebase firebase-cloud-functions api firebase-firestore-database

communitymap-cloud-functions's Introduction

Open Community Map - cloud functions

This repo contains microservices of Open Community Map used for

  • API
  • internal maintenance tasks

Installation

Clone the repo

git clone [email protected]:opencommunitymap/communitymap-cloud-functions.git
cd communitymap-cloud-functions/

Install dependencies

yarn install

Install Firebase functions dependencies. NOTE: node-10 is needed for this. You may want to use nvm or homebrew (if you're on mac)

cd functions/
yarn install

Run the functions

yarn serve

communitymap-cloud-functions's People

Stargazers

 avatar

Watchers

 avatar

communitymap-cloud-functions's Issues

Public API

We need to provide a public API in order to be able to integrate 3rd party services.

It will allow them to manage objects in our database.

Most important operations are create/update/delete. Less important (because of opencommunitymap/communitymap-ui#10) are list/get.

Planned object fields are

  • type
  • origin - mandatory, not changeable
  • title
  • description
  • loc - e.g. {lat:32,lng:23})
  • valid_until - ISO timestamp or null

We'll use Firebase cloud functions

Send email for new direct message

If the user is registered with verified email, it'd be nice to send to notify him when someone writes to him.

It could probably be done with a cloud function with firestore trigger.

It's a bit more complicated - we shouldn't email after every direct message as it's like chat thus encouraging sending more than one message - instead it'd be better to notify (1) about a new group of messages and (2) after they're not read for some time or if we detect user is not online.

We can't detect whether or not the user is online yet.
If he's online and new message is sent, unread-message indicator appears on his profile icon.

Replace Tslint with Eslint

TSLint is now deprecated as described in their article about it. For typescript projects I have now been using eslint directly with @typescript-eslint/eslint-plugin and @typescript-eslint/parser (as seen in cypress-firebase). This also makes it easy to integrate tools like prettier.

If you want I can work on switching things over if you would like - If so, do you have a linting preference in mind? Common styles include airbnb linting (semis and trailing commas) and standardjs linting (no unnecessary semis or trailing commas)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.