Skip to content

MariaDB-Hackathon-MY-2026/Cat-Spotter

Repository files navigation

🐱 CatSpotter

MariaDB Expo Node.js React Native

What is CatSpotter?

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.

Why MariaDB?

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.

Tech Stack

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

Getting Started (Local Setup)

  1. Clone the Repository

    git clone https://github.com/MariaDB-Hackathon-MY-2026/Cat-Spotter.git
    cd CatSpotter
  2. Install Dependencies

    npm install
  3. Configure Environment Variables

    • Copy .env.example to .env in the root and subdirectories.
    • Fill in the required credentials.
  4. Start the Infrastructure

    docker compose up -d
  5. Run Migrations and Seeds

    cd backend
    npm run migrate
    npm run seed
  6. Start the Application

    • Backend: cd backend && npm run dev
    • Frontend: cd frontend && npx expo start

Environment Variables

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

Project Structure

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

  • Team Name: [Sho]
  • Members: [MUHAMMAD SYAH BIN RAZAK]
  • University: [University Poly-Tech Malaysia]

About

Cat Spotter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors