# A geofenced social app that recognised faces, on the App Store

> A complete mini social network: events with a geofence, a React Native app whose photos land in the event's album only when the guest is there, and faces labelled automatically with Amazon Rekognition. Real-time GraphQL on AppSync, event-driven, on a start-up's budget.

- Client: A social-media start-up (Social media)
- Role: Architect and lead engineer, Nicolas Dao
- Status: Delivered. At neap.co
- Capabilities: Mobile apps, Computer vision, Real-time data, Event-driven architecture
- Web page: https://cloudlesslabs.com/work/geofenced-event-app/

## Outcomes

- Published on the App Store: built end to end, from the back end to a polished mobile app.
- Photos and events ingested at scale, in real time, through GraphQL on AWS AppSync and WebSockets.
- Automatic face detection and labelling with Amazon Rekognition.

## The situation

A founder wanted a social network built around events. Someone creates an event and draws a geofence around it. Guests who've been invited, and are actually inside the fence, take photos with the app, and the photos go straight into the event's shared album. No sharing links afterwards, no photos from people who weren't there.

It was a big project for a start-up's budget, and it had to feel as good as the social apps people already used.

## What we built

The whole product, a complete mini social network:

- **A React Native mobile app** with an event feed, events, invitations and albums. A lot of the work went into the front end, to make the app beautiful and fast.
- **Geofencing.** The app knows when a guest is inside an event's fence, and only then sends their photos to its album.
- **Faces labelled automatically.** Each photo went through Amazon Rekognition, which detected the faces in it and labelled them. That was before automatic face tagging became something social networks backed away from, and it worked.
- **A real-time back end** on GraphQL with AWS AppSync, in its early days, with WebSocket subscriptions so albums and feeds updated live, and Amazon RDS for the data.
- **Event-driven processing** so a burst of photos at a big event was ingested, stored and analysed without slowing the app down.

## How it ended

The app went end to end and was published on the App Store. Everything had to fit the client's budget, which meant choosing managed services that cost nothing when idle and scale when an event fills up.

It was also where I adopted GraphQL early, and learned what it costs: a schema to maintain as a second product. I've since gone back to plain web APIs, for reasons I explain in [GraphQL and AppSync](https://cloudlesslabs.com/stack/aws-appsync/index.md).

## Why it matters to you

Mobile, real-time, computer vision and scale, in one product, on a small budget. The same building blocks, now with far better AI models behind them, are what most consumer apps need today.

## Built with

- [Amazon Web Services (AWS)](https://cloudlesslabs.com/stack/aws/index.md): My default in The Stack
- [GraphQL and AppSync](https://cloudlesslabs.com/stack/aws-appsync/index.md): Never in The Stack
- [AWS Lambda](https://cloudlesslabs.com/stack/aws-lambda/index.md): My default in The Stack
- [Amazon S3](https://cloudlesslabs.com/stack/aws-s3/index.md): My default in The Stack
- React Native
- GraphQL
- WebSockets
- Amazon Rekognition
- Amazon RDS
- Geofencing

## Related

- [Real-time ingestion for a large farm-sensor network](https://cloudlesslabs.com/work/realtime-iot/index.md): a related project
- [Crypto market analysis and an automated trading bot](https://cloudlesslabs.com/work/crypto-analysis/index.md): a related project
- [An e-commerce platform built from scratch in California](https://cloudlesslabs.com/work/ecommerce-from-scratch/index.md): a related project
- [Every project](https://cloudlesslabs.com/work/index.md)
- [How we work](https://cloudlesslabs.com/about/how-we-work/index.md)
- [Map of every Markdown file on cloudlesslabs.com, with what each one answers](https://ask.cloudlesslabs.com)
