Skip to content

Danisydau/ipanema-brand-tracker

Repository files navigation

Ipanema Brand Tracker

A comprehensive platform for tracking brand activations, measuring campaign ROI, and managing customer engagements.

License Version

Overview

Ipanema Brand Tracker is a full-stack application designed to help marketing teams measure and optimize the ROI of their brand activation campaigns. It provides tools for managing campaigns, tracking events, monitoring customer engagement, implementing gamification strategies, and analyzing marketing performance.

This platform is optimized for cost-effective API usage and performance through comprehensive caching strategies, request optimization, and user-configurable data-saving features. Check out OPTIMIZATIONS.md for a detailed breakdown of the performance features implemented.

Features

  • User Management: Role-based access control (Super Admin, Admin, Brand Manager, Staff)
  • Brand Management: Create and manage multiple brands
  • Campaign Management: Plan, execute, and track marketing campaigns
  • Event Tracking: Manage physical and virtual brand activation events
  • Participant Engagement: Register participants and track their interactions
  • Gamification: Implement points, badges, and rewards systems
  • Analytics & Reporting: Visualize campaign performance and ROI
  • Retargeting: Create follow-up marketing campaigns based on engagement data
  • Real-time Updates: Monitor events and engagement in real-time

Technology Stack

Frontend

  • Next.js 14 with TypeScript
  • Redux Toolkit & React Query
  • TailwindCSS
  • Chart.js for data visualization

Backend

  • Express.js with TypeScript
  • Prisma ORM with PostgreSQL
  • JWT Authentication
  • Socket.IO for real-time updates

Infrastructure

  • Docker & Docker Compose
  • Nginx for load balancing
  • Redis for caching
  • Prometheus & Grafana for monitoring

Getting Started

Prerequisites

  • Docker and Docker Compose
  • Node.js 18+ (for local development)
  • PostgreSQL 15+ (if running databases locally)

Quick Start with Docker

The easiest way to get started is using the provided setup script:

# Make the script executable if it's not already
chmod +x setup-test-environment.sh

# Run the setup script
./setup-test-environment.sh

This will:

  1. Start all services with Docker Compose
  2. Run database migrations
  3. Seed the database with test data
  4. Provide access information for the various components

Manual Setup

Backend Setup

cd backend

# Install dependencies
npm install

# Generate Prisma client
npm run prisma:generate

# Run migrations
npm run prisma:migrate

# Seed the database
npm run prisma:seed

# Start the server
npm run dev

Frontend Setup

cd frontend

# Install dependencies
npm install

# Start the development server
npm run dev

Test Accounts

The seed script creates the following test accounts:

Email Password Role
[email protected] Password123! SUPER_ADMIN
[email protected] Password123! ADMIN
[email protected] Password123! BRAND_MANAGER
[email protected] Password123! STAFF

Documentation

Mobile Testing

For testing on mobile devices like iPhone:

  1. Local Network Testing:

    • Find your computer's local IP address
    • Update the environment configuration to use this IP
    • Connect your mobile device to the same network
    • Access the application via your computer's IP address
  2. Using Ngrok:

    • Install ngrok: brew install ngrok
    • Run: ngrok http 80
    • Access the generated URL from your mobile device

Development Workflow

  1. Branch Strategy:

    • main - Production-ready code
    • dev - Integration branch for features
    • feature/* - Individual feature branches
  2. Testing:

    • Write unit tests for business logic
    • Use integration tests for API endpoints
    • Conduct UI testing for critical user flows
  3. Deployment:

    • Build Docker images
    • Use Docker Compose for local/staging deployments
    • CI/CD pipeline for automated testing and deployment (TBD)

License

ISC License

Contact

For questions about this project, please contact Ipanema Media.