Sportspheree
Developed a sports-focused social media platform using Next.js and NextAuth with Google OAuth, Mongoose, and MongoDB for the backend. The platform was deployed on Vercel, ensuring scalability and performance.

Explore the live site here: sportspheree.vercel.app
Key Features
- Create and manage sports-related posts.
- View posts by tags and profiles.
- Edit or delete posts with ease.
- Browse a personalized feed of posts.
Design and Technical Decisions
Why Next.js?
- Server-Side Rendering (SSR): Generates HTML on the server at runtime for each request, boosting SEO and initial load performance, crucial for a social media platform.
- Static Site Generation (SSG): Pre-renders pages that don’t change often during build time, speeding up page loads and leveraging caching and CDNs for scalability.
NextAuth for Authentication
- OAuth: A secure, industry-standard method for authentication. NextAuth handles complexities like managing access tokens, authorization flows, and session management.
- No need for storing user passwords, reducing security risks. Users log in via trusted third-party providers like Google.
MongoDB and Mongoose
- NoSQL Flexibility: Perfect for storing posts, profiles, and tags, which can vary in structure and content. Allows easy evolution of the schema for future features.
- Mongoose: Defined schemas for posts and user data, adding structure and enabling validation in a NoSQL database.
- Data was denormalized to make CRUD operations faster, aligning with the app’s need for quick data access.
Deployment on Vercel
- Optimized for Next.js, offering seamless integration and performance enhancements.
- Ensures high availability and scalability of the platform.
Future Updates
- Concurrent Edits or Likes: Plan to implement optimistic locking with versioning, similar to version control systems like Git, to handle conflicts gracefully.
- Scaling: Explore using MongoDB Atlas for global scalability and performance. Add indexes on commonly queried fields like tags and user IDs for faster queries.
- Media Handling: Introduce support for images or videos in posts using services like Google Cloud Storage or AWS S3, linking media files to posts stored in MongoDB.