https://github.com/marcelo-m7/monynha.fun
Monynha Fun - Um acervo de conteΓΊdos babadeiros do youtube
https://github.com/marcelo-m7/monynha.fun
bun docker monynha monynha-fun online postgresql project shadcn-ui supabase typescript website
Last synced: 3 months ago
JSON representation
Monynha Fun - Um acervo de conteΓΊdos babadeiros do youtube
- Host: GitHub
- URL: https://github.com/marcelo-m7/monynha.fun
- Owner: marcelo-m7
- Created: 2026-01-06T12:06:14.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-03-08T16:19:51.000Z (3 months ago)
- Last Synced: 2026-03-08T16:22:57.166Z (3 months ago)
- Topics: bun, docker, monynha, monynha-fun, online, postgresql, project, shadcn-ui, supabase, typescript, website
- Language: TypeScript
- Homepage: https://monynha.fun
- Size: 6.64 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Monynha Fun β Cultural Video Curation Platform π¬

> *A passion project by **Marcelo Santos**, crafted with care to bring together the best of cultural video content that gets lost in the algorithmic noise. Now with mention autocomplete because Marcelo got tired of copying usernames like it's 2005.*
**π Live Platform**: https://monynha.fun
---
## π What's This All About?
Look, I built Monynha Fun because I was fed up, sabe? Scrolling through YouTube, seeing the same algorithm-driven trash, while *amazing* cultural content just... disappears. So here's the deal:
We're creating a space where **human taste matters**. A place where curators (like you, like me) can say "ey, this video is worth your time" β and mean it. AI helps us out, sure, but **humans are in charge**. No predatory engagement metrics. No dark patterns. Just good content, properly organized.
### The Vision
- π€ **People > Algorithms**: Real human expertise, enhanced by AI (not replaced by it)
- π **Cultural Preservation**: Keeping the gems that YouTube's algorithm would bury
- π **Community-Driven**: Every curator brings their taste, their knowledge, their soul
- π **Learning Through Playlists**: Organize videos into beautiful learning paths
- π **Open & Accessible**: Quality content for everyone, no gatekeeping
---
## πΈ See It In Action
### Homepage β Where Magic Happens β¨

Your first impression matters, nΓ©? Clean hero section, easy access to what's hot right now, and categories that actually make sense. No fluff.
### Discover Videos π

Browse through categories that real people organized. Search, filter, read about *why* someone added a video. Simple as that.
### Create Playlists Like You Own The Place π

Build learning paths. Curate collections. Share with friends or the whole community. Your taste, your rules. You can even invite collaborators to help build something together.
### Comments & Community Interaction π¬

Every video deserves thoughtful discussion. Leave comments, reply to curators, share why a video matters to you. Build real conversations around content that resonates.
**β¨ NEW**: Type `@` and watch the magic happen β autocomplete dropdown with user avatars, keyboard navigation (ββ to browse, Enter to select), and 300ms debouncing because we're not savages who spam the database. Works on mobile too. π±
**π Public Comments**: Everyone can read comments now β even anonymous lurkers. Good discussions deserve an audience. (Don't worry, only logged-in folks can post. We're not *that* crazy.)
No algorithms deciding what's visible β comments stay honest and community-driven. Tag people with `@username` and actually see their face pop up. Because UX matters, viu?
### Your Profile π€

Show the world what you're passionate about. Add a bio, customize your presence. People will see the videos *you* curated. Be proud of that.
---
## π The Tech Behind It All
I chose a stack that's modern, scalable, and β honestly β a joy to work with. No bloat, no unnecessary complexity.
### Frontend Magic β¨
- **React.js** + **TypeScript** β Because bugs are embarrassing
- **Vite** β Lightning-fast builds and dev server. Makes coding pleasant
- **Tailwind CSS** β Utility-first styling without CSS headaches
- **shadcn/ui** β Beautiful components that just work
- **React Router DOM** β Smooth navigation experience
### State & Data Management π§
- **TanStack Query** β Smart caching and server state (no data soup)
- **React Hook Form** β Forms that don't suck
- **Zod** β Type-safe validation from day one
### Backend Backbone π§
- **Supabase** β PostgreSQL, Auth, and Edge Functions in one place
- **Supabase RLS** β Row-level security, properly implemented
- **Edge Functions** β AI enrichment and smart automations
### UX Polish π¨
- **Lucide React** β Clean icons
- **Sonner** β Toast notifications that don't annoy
- **date-fns** β Dates done right
- **i18next** β Portuguese, English, and more
### Code Quality & CI/CD π§
- **ESLint** + **TypeScript** β Catch errors before they happen
- **Vitest** β Fast, modern testing framework
- **GitHub Actions** β Automated CI with intelligent caching
- **Feature-Sliced Design** β Organized by domain (entities, features, shared)
---
## π― What Can You Do Here?
### π Discover Videos
Browse intelligently organized content. Search, filter by category, see what real curators think about each video. No dark patterns, just honest recommendations.
### π Build Playlists
Create learning paths, collections, whatever makes sense to you. Share with the community or keep it personal. Invite friends to collaborate β yeah, we support that.
### π₯ User System
Sign up securely. Create a profile that represents *you*. Show everyone your curated taste. Your contribution matters here.
### β Save Favorites
Keep track of videos that hit different. Your personal collection grows with you.
### π Community
See who else is curating. Check out their playlists. Learn from other people's taste. Share knowledge.
### πΉ Submit Content
Found an amazing video the world should see? Add it to Monynha Fun. Our AI will help enrich it with metadata.
### π Multi-Language
Portuguese, English, Spanish, French β we're building for everyone. More languages coming.
### π¬ Smart Mentions
Tag users in comments with autocomplete that actually works. Type `@` and boom β dropdown with avatars, display names, and keyboard navigation. No more copying usernames like a caveman. Fully internationalized in 4 languages because we're fancy like that. β¨
---
## π Getting Started (It's Easy, I Promise)
### Set It Up Locally
```bash
# Clone the repo
git clone https://github.com/marcelo-m7/monynha.fun
# Go into the folder
cd monynha.fun
# Install dependencies
pnpm install
# or if you prefer npm:
npm install
# Fire it up!
pnpm dev
```
Open **http://localhost:8080** and boom β you're in.
### Environment Setup
Create a `.env.local` file (ask Marcelo for the keys, or set up your own Supabase project):
```env
VITE_SUPABASE_URL=your_supabase_url_here
VITE_SUPABASE_PUBLISHABLE_KEY=your_publishable_key_here
```
---
## π How The Code Is Organized
The structure is clean and logical β I hate messy codebases:
```
src/
βββ components/ # Reusable UI pieces
β βββ ui/ # shadcn/ui components (don't touch upstream)
β βββ playlist/ # Playlist-specific components
β βββ Header.tsx
β βββ Footer.tsx
β βββ ...
βββ pages/ # Page-level components (one per route)
β βββ Index.tsx # Homepage
β βββ Auth.tsx # Login/Signup
β βββ Videos.tsx # Video browse
β βββ VideoDetails.tsx # Single video view
β βββ Playlists.tsx # Playlist manager
β βββ PlaylistDetails.tsx
β βββ Profile.tsx # User profiles
β βββ EditProfile.tsx
β βββ Favorites.tsx
β βββ Community.tsx
β βββ Submit.tsx # Add videos
β βββ ...more pages
βββ features/ # Feature modules (organized by domain)
β βββ auth/ # Authentication
β βββ videos/ # Video management
β βββ playlists/ # Playlist management
β βββ ...
βββ entities/ # Domain entities
β βββ video/ # Video entity & API
β βββ playlist/ # Playlist entity & API
β βββ ...
βββ shared/ # Shared utilities and hooks
β βββ hooks/ # Reusable React hooks
β β βββ use-mobile.tsx # Mobile detection
β β βββ useVideoViewIncrement.tsx # Video view tracking
β β βββ useRequireAuth.tsx # Authentication guard
β βββ lib/ # Helper functions
β β βββ format.ts # Data formatting utilities
β β βββ youtube.ts # YouTube URL parsing
β βββ test/ # Testing utilities
βββ integrations/ # External services
β βββ supabase/ # Supabase client setup
βββ lib/ # Utilities
β βββ utils.ts # Helpers (cn, etc)
β βββ youtube.ts # YouTube URL parsing, oEmbed
βββ i18n/ # Translations
β βββ config.ts # i18next setup
β βββ locales/ # PT, EN, etc
βββ App.tsx # Main app & routes
βββ main.tsx # Entry point
```
### Custom Hooks
The codebase includes several custom hooks to promote code reuse and maintainability:
#### `useVideoViewIncrement`
Manages video view count increments with optimistic UI updates:
```typescript
const { viewCount, showPlus, handleViewIncrement } = useVideoViewIncrement(initialCount, animationDuration);
```
#### `useRequireAuth`
Authentication guard for protected routes:
```typescript
const { user, loading } = useRequireAuth('/auth');
```
#### `use-mobile`
Detects if the user is on a mobile device:
```typescript
const isMobile = useMobile();
```
Every folder has a purpose. No random files lying around.
---
## π Available Commands
```bash
# Development server with hot reload (what you'll use most)
pnpm dev
# Build for production (minified, optimized)
pnpm build
# Build with dev settings (if debugging production)
pnpm build:dev
# Preview the production build locally
pnpm preview
# Run the linter (keep code clean)
pnpm lint
# Type-check the project
pnpm typecheck
# Run tests (one-off)
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run tests with coverage
pnpm test:coverage
# Generate bundle analysis report
pnpm build:analyze
```
---
## π³ Deploying This Thing
We use Docker to keep everything consistent. Nginx serves the static build.
```bash
# Build the image
docker build -t monynha-fun .
# Run it locally
docker run -p 80:80 monynha-fun
```
Then hit `http://localhost` and you're golden.
### Platforms That Work
- **Coolify** (recommended β simple, clean)
- Any Docker-compatible host (AWS, DigitalOcean, Heroku, whatever)
- Vercel/Netlify (if you prefer that workflow)
Just make sure your Supabase env vars are set. That's it.
---
## π Making It Work β Environment Variables
You need two things from Supabase:
```env
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_PUBLISHABLE_KEY=your_publishable_key_here
```
These are public (it's fine, Supabase uses RLS to protect data). Create a `.env.local` file in the root and paste them in.
---
## ποΈ The Database (Where The Magic Happens)
I designed the database with security and simplicity in mind:
### Core Tables
- **profiles** β User info (name, bio, avatar)
- **videos** β The actual content (title, description, YouTube ID)
- **categories** β Organized tags (Tech, Arts, Education, etc)
- **favorites** β Videos you bookmarked
- **playlists** β Your collections
- **playlist_videos** β Links videos to playlists (with ordering!)
- **ai_enrichments** β AI-generated metadata for each video
- **playlist_collaborators** β Share playlists with friends
- **playlist_progress** β Track watched videos in learning playlists
### Security First π
Every table has Row-Level Security (RLS) enabled. Users can only see/edit their own data. Period.
No data leaks. No shortcuts. We take that seriously.
---
## π¨ The Design System
### Tailwind CSS
No CSS files. No modules. Just clean utility classes. Responsive by default.
### shadcn/ui Components
High-quality, accessible components. We extend them when needed but don't modify the source (keeps upgrades smooth).
### Icons from Lucide React
Simple, beautiful, consistent. Covers almost everything.
---
## π Languages & Internationalization
Built with i18next so we can add languages super easily. Right now:
- π§π· **Portuguese (PT-BR)**
- πΊπΈ **English (EN-US)**
More languages? Easy. Just ask or add translations to `src/i18n/locales/`.
---
## π€ Want to Contribute?
Great! You can work locally or directly on GitHub. Here's how:
### Option 1: Local Development (The Pro Way)
```bash
git clone https://github.com/marcelo-m7/monynha.fun
cd monynha.fun
pnpm install
pnpm dev
```
Make changes, test locally, push to your branch.
### Option 2: GitHub Web Editor (Quick Fixes)
1. Go to a file
2. Click the pencil icon
3. Edit and commit
### Option 3: GitHub Codespaces (If You're Feeling Fancy)
1. Click "Code" β "Codespaces" β "New codespace"
2. Edit directly in the browser
3. Commit and push
---
## π Custom Domain
Want your own domain? Your deployment platform probably has docs for that. Set DNS records, done.
---
## π More Resources
- **About Page** β Learn what we're really doing here
- **FAQ Page** β Answers to stuff people ask
- **Rules Page** β How to behave (spoiler: just be cool)
- **Contact Page** β Hit me up if you have questions
---
## π What Gets Tracked
- How many videos are curated
- Who's contributing
- View counts (so we can feature the good stuff)
- Category popularity
Nothing creepy. No ads. No surveillance.
---
## π Running Into Problems?
### Port Already In Use?
```bash
pnpm dev -- --port 3000
```
### Dependencies Missing?
```bash
# Clear and reinstall
rm pnpm-lock.yaml
pnpm install
```
### Build Failing?
```bash
# Clear the cache
rm -rf dist
pnpm build
```
### Something Else?
Check the [Supabase docs](https://supabase.com/docs) or [Vite docs](https://vitejs.dev). Or just message me (@marcellosantos).
---
## π About This Project
**Built by**: Marcelo Santos
**Organization**: Monynha Softwares
**License**: Check the LICENSE file
**Version**: 0.1.5 (and growing!)
---
## π What's Next?
We're constantly improving. On the roadmap:
- Batch AI enrichment for existing videos
- Video search with full-text indexing
- Smart recommendations
- Community comments & ratings
- Better mobile experience
- Maybe a mobile app someday
---
## π Get Involved
- πΉ **Submit videos** β Share the good stuff
- π **Create playlists** β Build learning paths
- π **Report bugs** β Help us improve
- π‘ **Suggest features** β What's missing?
- π€ **Spread the word** β Tell your friends
---
**Visit us at**: https://monynha.com
**Made with** β **and** π‘ **by Marcelo Santos**