Skip to content

xavieroyj/HiringAssignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Reddit Memes Analytics Platform

A full-stack application for tracking, analyzing, and visualizing trending memes from Reddit's r/memes subreddit. This project is a hiring exercise for a full-stack developer position at Hepmil

Project Overview

This platform provides:

  • Real-time meme tracking and analysis
  • Historical data collection and visualization
  • Automated report generation via Telegram
  • Modern dashboard interface

Project Structure

reddit-memes-analytics/
├── apps/
│   ├── backend/              # NestJS Backend API
│   │   ├── prisma/          # Database schema and migrations
│   │   ├── src/             # Application source code
│   │   │   ├── reddit-crawler/
│   │   │   ├── telegram/
│   │   │   └── main.ts
│   │   └── README.md
│   └── frontend/            # Frontend Dashboard
│       ├── index.html      # Main dashboard page
│       ├── server.js       # Static file server
│       └── package.json
├── docs/                    # Documentation
├── INSIGHTS.md             # Alternative use cases
└── README.md               # This file

Features

Backend

  • Reddit API integration for meme crawling
  • PostgreSQL database with Prisma ORM
  • Historical data tracking
  • Telegram bot integration
  • RESTful API with Swagger documentation

Frontend

  • Modern dark theme dashboard
  • Interactive data visualization
  • Real-time statistics
  • Responsive design
  • Grid-based meme gallery

Reports

  • Automated report generation
  • Telegram delivery
  • Historical report archiving
  • Customizable report formats

Technology Stack

  • Backend:

    • NestJS/TypeScript
    • PostgreSQL/Prisma
    • Reddit API
    • Telegram Bot API
    • OpenAPI/Swagger
  • Frontend:

    • HTML5/CSS3
    • Modern JavaScript
    • Chart.js
    • Bootstrap 5

Getting Started

Prerequisites

  • Node.js >= 18
  • PostgreSQL >= 14
  • npm or yarn
  • Telegram Bot Token

Backend Setup

  1. Navigate to backend directory:
cd apps/backend
  1. Install dependencies:
npm install
  1. Configure environment:
cp env.example .env
# Update .env with your credentials
  1. Run migrations:
npx prisma migrate dev
  1. Start server:
npm run start:dev

Frontend Setup

  1. Navigate to frontend directory:
cd apps/frontend
  1. Install dependencies:
npm install
  1. Start server:
npm start
  1. Access dashboard:
http://localhost:8080

API Documentation

Access Swagger documentation at:

http://localhost:3000/api/docs

Key Endpoints

  • GET /api/memes/top - Get top 20 memes (24h)
  • GET /api/memes/fetch - Fetch latest 100 memes
  • POST /api/reports/generate - Generate report
  • GET /api/reports/latest - Get latest report

Features in Detail

1. Meme Tracking

  • Automated crawling of r/memes
  • Vote history tracking
  • Trend analysis
  • Real-time updates

2. Data Visualization

  • Interactive vote distribution chart
  • Historical trend analysis
  • Real-time statistics
  • Performance metrics

3. Report Generation

  • Automated daily reports
  • Telegram integration
  • Custom formatting
  • Historical archiving

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

See LICENSE file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors