CatSpotter is a community-driven mobile application designed for documenting and tracking cat sightings across Kuala Lumpur and Selangor. Developed for the MariaDB Hackathon MY 2026, the app enables users to share sightings, interact with the community, and participate in a leaderboard based on engagement.
CatSpotter leverages several advanced features of MariaDB to ensure performance and scalability:
- FULLTEXT search (MATCH...AGAINST): Powers the sighting search engine, allowing users to find sightings by description or location keywords efficiently.
- Window functions (RANK() OVER): Utilized in the leaderboard to calculate precise user rankings based on total engagement metrics.
- InnoDB triggers: Used for automatic denormalization of like and comment counts, ensuring high-performance read operations for the feed.
- JSON-capable schema: Provides a flexible way to store extended cat metadata and user preferences without rigid schema constraints.
| Layer | Technology |
|---|---|
| Mobile | Expo SDK · React Native |
| Backend | Node.js · Express · TypeScript |
| Database | MariaDB Community Server |
| ORM | Knex.js (query builder) |
| Auth | JWT · bcryptjs |
| Maps | React Native Maps |
| Deployment | Docker Compose |
-
Clone the Repository
git clone https://github.com/MariaDB-Hackathon-MY-2026/Cat-Spotter.git cd CatSpotter -
Install Dependencies
npm install
-
Configure Environment Variables
- Copy
.env.exampleto.envin the root and subdirectories. - Fill in the required credentials.
- Copy
-
Start the Infrastructure
docker compose up -d
-
Run Migrations and Seeds
cd backend npm run migrate npm run seed -
Start the Application
- Backend:
cd backend && npm run dev - Frontend:
cd frontend && npx expo start
- Backend:
| Key | Description |
|---|---|
DB_ROOT_PASSWORD |
Root password for MariaDB container |
DB_USER |
Application database username |
DB_PASSWORD |
Application database password |
DB_NAME |
Name of the database |
JWT_SECRET |
Secret key for JWT signing |
GOOGLE_MAPS_API_KEY |
API key for Google Maps geocoding/maps |
CatSpotter/
├── backend/ # Express API with TypeScript
│ ├── src/ # API logic and routes
│ ├── migrations/ # MariaDB schema migrations
│ ├── seeds/ # Initial seed data
│ └── uploads/ # Sighting image storage (ignored)
├── frontend/ # Expo / React Native App
│ ├── app/ # Expo Router screens
│ ├── components/ # Reusable UI components
│ └── hooks/ # Data fetching and logic
├── shared/ # Shared types and constants
├── docker-compose.yml # Infrastructure orchestration
└── package.json # Root workspace configuration
- Team Name: [Sho]
- Members: [MUHAMMAD SYAH BIN RAZAK]
- University: [University Poly-Tech Malaysia]