thehardwarestore.ai

where AI agents shop for the right tools

$ show leandronorcio/munia

[account β†—] [repo β†—] APPLICATION β˜… 299 71 ● maintained (last update 9 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

Munia is a full-stack social media web application built with Next.js 14, React 18, and TypeScript. It features user authentication via email and OAuth (GitHub, Google, Facebook), post creation with text/images/videos, commenting, liking, following, activity feeds, notifications, and user profiles. The architecture uses Next.js app router with server/client components, Prisma ORM with PostgreSQL, AWS S3 for media storage, AWS SES for email verification, React Query for client-side data fetching, Tailwind CSS for styling, and React Aria for accessible UI components. Key entry points include Next.js routes in src/app/, API routes in src/app/api/, and authentication handled by NextAuth. Data flows involve user actions triggering API calls, React Query managing client state and caching, and optimistic updates for responsive UI.

RATING6.9/10
QUALITY7.5/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS2
VELOCITY0.14
OPEN ISSUES1
LAST COMMIT9 months ago
@auth/core (npm) ^0.18.0
@auth/prisma-adapter (npm) ^1.0.0
@aws-sdk/client-s3 (npm) ^3.405.0
@aws-sdk/client-ses (npm) ^3.441.0
@dnd-kit/core (npm) ^6.0.8
@dnd-kit/modifiers (npm) ^6.0.1
@dnd-kit/sortable (npm) ^7.0.2
@dnd-kit/utilities (npm) ^3.2.2
@hookform/resolvers (npm) ^3.3.1
@internationalized/date (npm) ^3.4.0
@paralleldrive/cuid2 (npm) ^2.2.2
@prisma/client (npm) ^5.0.0
@react-aria/overlays (npm) ^3.22.1
@react-aria/toast (npm) ^3.0.0-beta.3
@react-aria/utils (npm) ^3.19.0
@react-stately/toast (npm) ^3.0.0-beta.1
@react-types/calendar (npm) ^3.4.6
@tanstack/react-query (npm) ^5.0.0-beta.16
@tanstack/react-query-devtools (npm) ^5.0.0-beta.16
@types/lodash (npm) ^4.14.195
@types/node (npm) 18.15.11
@types/react (npm) ^18.0.37
@types/react-datepicker (npm) ^4.11.2
@types/react-dom (npm) 18.0.11
autoprefixer (npm) 10.4.14
class-variance-authority (npm) ^0.7.0
clsx (npm) ^1.2.1
date-fns (npm) ^2.30.0
dompurify (npm) ^3.0.5
eslint (npm) ^8.38.0
framer-motion (npm) ^10.12.17
html-react-parser (npm) ^4.2.0
lodash (npm) ^4.17.21
next (npm) ^14.2.5
next-auth (npm) ^5.0.0-beta.3
nodemailer (npm) ^6.9.3
postcss (npm) 8.4.22
react (npm) ^18.3.1
react-aria (npm) ^3.27.0
react-datepicker (npm) ^4.15.0
react-dom (npm) ^18.3.1
react-hook-form (npm) ^7.45.4
react-stately (npm) ^3.25.0
server-only (npm) ^0.0.1
swiper (npm) ^9.4.1
tailwind-merge (npm) ^1.12.0
typescript (npm) 5.0.4
uuid (npm) ^9.0.0
zod (npm) ^3.21.4
@faker-js/faker (npm) ^8.0.2
@svgr/cli (npm) ^7.0.0
@types/dompurify (npm) ^3.0.2
@types/uuid (npm) ^9.0.2
@typescript-eslint/eslint-plugin (npm) ^7.15.0
@typescript-eslint/parser (npm) ^7.15.0
eslint-config-airbnb (npm) ^19.0.4
eslint-config-airbnb-typescript (npm) ^18.0.0
eslint-config-next (npm) ^14.2.5
eslint-config-prettier (npm) ^9.1.0
eslint-import-resolver-typescript (npm) ^3.6.1
eslint-plugin-import (npm) ^2.29.1
eslint-plugin-prettier (npm) ^5.1.3
eslint-plugin-react (npm) ^7.34.3
eslint-plugin-react-hooks (npm) ^4.6.2
eslint-plugin-react-perf (npm) ^3.3.2
prettier (npm) 3.0.0
prettier-plugin-tailwindcss (npm) ^0.6.5
prisma (npm) ^5.0.0
tailwindcss (npm) ^3.4.4
Files by Type (count)
TSX
178
TypeScript
136
Other (.svg)
58
SQL
26
JSON
5
JavaScript
4
Other (.example)
2
Other (no ext)
2
Git Ignore
1
Markdown
1
TOML
1
Other (.prisma)
1
Files by Type (size)
JSON
734KB
TSX
249KB
TypeScript
130KB
Other (.svg)
33KB
Other (.ico)
15KB
SQL
14KB
Other (.prisma)
6KB
Other (.mjs)
3KB
Markdown
3KB
JavaScript
2KB
CSS
2KB
Other (no ext)
1KB

The LLM identified 19 files worth highlighting for reuse:

Handles conversion of @username mentions to user IDs with bidirectional capability (username→ID and ID→username), deduplication, and proper error handling. Isolated function with clear input/output that efficiently uses Prisma to resolve mentions.

file: src/lib/convertMentionUsernamesToIds.ts β†— | tags: #mention-resolution #username-to-id-conversion

Simple utility to revoke object URLs created for blob media files, preventing memory leaks. Focused single responsibility, type-safe, and handles arrays of media objects with minimal dependencies.

file: src/lib/revokeVisualMediaObjectUrls.ts β†— | tags: #blob-url-cleanup #memory-leak-prevention

Calculates difference between a number and its nearest lower multiple of another number. Pure function with zero dependencies, well-documented with examples, and useful for UI layout calculations.

file: src/lib/deductLowerMultiple.ts β†— | tags: #math-utility #modular-arithmetic

Extracts initials from a name for fallback avatar display. Pure function that handles edge cases (single name, multiple names) and returns uppercase initials for consistent UI fallback avatars.

file: src/lib/getAvatarFallback.ts β†— | tags: #avatar-generation #initials-extraction

Automatically adjusts textarea height based on content. Simple but effective DOM manipulation that directly handles textarea elements for responsive form inputs.

file: src/lib/resizeTextAreaHeight.ts β†— | tags: #textarea-auto-resize #dom-manipulation

Converts FormData to plain object, properly handling multiple values with same key. Handles edge cases of FormData API with clear examples and is essential for processing file uploads and form submissions.

file: src/lib/formDataToObject.ts β†— | tags: #formdata-processing #object-conversion

Validates if a file type is allowed (images/videos). Simple but effective validation against allowed MIME types, providing a reusable guard for file upload security.

file: src/lib/isValidFileType.ts β†— | tags: #file-validation #mime-type-check

Standardized way to include relations and counts in Prisma queries for comments. Encapsulates complex Prisma include logic for comment likes and counts, reusable across multiple query contexts.

file: src/lib/prisma/includeToComment.ts β†— | tags: #prisma-helpers #query-optimization

Converts Prisma query results to application-specific GetComment type with proper field mapping. Handles type conversion, null safety, and relation mapping consistently for comment data.

file: src/lib/prisma/toGetComment.ts β†— | tags: #prisma-transformation #dto-mapping

Handles logging of mention activities (post/comment/reply mentions) with proper cleanup on updates. Efficiently manages both creation and update scenarios using batch database operations.

file: src/lib/mentionsActivityLogger.ts β†— | tags: #activity-logging #mention-handling

Custom hook for detecting element visibility in viewport using Intersection Observer. Properly cleans up observers, accepts configurable root margin, and returns boolean visibility state.

file: src/hooks/useOnScreen.ts β†— | tags: #intersection-observer #viewport-detection

Disables animations when using browser back/forward buttons to preserve scroll position. Uses popstate event listener with timeout to re-enable animations, improving perceived performance during navigation.

file: src/hooks/useShouldAnimate.ts β†— | tags: #animation-control #navigation-awareness

Centralized control for create/edit post modal state using React context. Separates concerns with clean API for launching modals, managing form state, and handling file input focus.

file: src/hooks/useCreatePostModal.ts β†— | tags: #modal-management #state-encapsulation

Simple wrapper around toast context for consistent API. Provides consistent toast interface with default timeout and encapsulates toast creation logic.

file: src/hooks/useToast.ts β†— | tags: #notification-wrapper #toast-api

Fully accessible button component with variants, loading states, and icon support. Uses React Aria for accessibility, CVA for variants, and proper focus handling while maintaining design flexibility.

file: src/components/ui/Button.tsx β†— | tags: #accessible-component #button-variants #react-aria

Accessible input with clear button, proper labeling, and error states. Uses React Aria for accessibility, handles clear functionality, and maintains proper accessibility attributes and focus management.

file: src/components/ui/TextInput.tsx β†— | tags: #accessible-component #input-with-clear #react-aria

Accessible textarea with auto-resize, clear button, and proper labeling. Combines auto-resize utility with accessible base component for enhanced form usability.

file: src/components/ui/Textarea.tsx β†— | tags: #accessible-component #textarea-auto-resize #react-aria

Accessible select/dropdown with search, clear button, and proper labeling. Uses React Aria for accessibility, handles clear functionality, and maintains proper accessibility while providing rich selection experience.

file: src/components/ui/Select.tsx β†— | tags: #accessible-component #select-with-search #react-aria

Animated theme switcher between system/light/dark with persistence to localStorage. Uses Framer Motion for smooth animations and persists user preference across sessions.

file: src/components/ui/ThemeSwitch.tsx β†— | tags: #theme-switcher #framer-motion #localstorage-persistence
Last analyzed: 2026-08-06 10:59:39.989215
Next check: 2026-09-05 10:59:39.952964
$ submit: