Spyglass is a Reddit analytics tool that tracks user activity across multiple subreddits, providing insights into user interactions, comment patterns, and cross-subreddit engagement.
- Track user activity across multiple subreddits
- View comprehensive statistics about subreddit interactions
- Identify users who are active in multiple communities
- Filter data by date ranges (including pre/post Oct 7th, 2023)
- Real-time updates of tracked statistics
- Interactive data visualization with bar charts
- Fullstack: SvelteKit, Sveltestrap (Bootstrap components)
- Database: PostgreSQL (via Prisma ORM)
- Caching: Redis (via Upstash)
- API: Reddit API (via Snoowrap)
- Data Visualization: ApexCharts, D3.js
- Testing: Not implemented
- Deployment: Vercel
- Node.js
- PostgreSQL database
- Redis instance (optional)
-
Clone the repository
git clone https://github.com/yourusername/spyglass.git cd spyglass -
Install dependencies
npm install
-
Create a
.envfile in the project root and add your environment variables:POSTGRES_URL=your_postgres_connection_string REDIS_URL=your_redis_url (optional) REDDIT_CLIENT_ID=your_reddit_client_id REDDIT_CLIENT_SECRET=your_reddit_client_secret REDDIT_USERNAME=your_reddit_username REDDIT_PASSWORD=your_reddit_password -
Initialize the database
npx prisma db push
-
Start the development server
npm run dev
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run check- Run TypeScript checksnpm run format- Format code with Prettiernpm run lint- Run linting
By default, Spyglass tracks activity from the following subreddits:
- h3h3productions
- h3snark
- Hasan_Piker
- Destiny
- LivestreamFail
- LeftoversH3
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.