binh234 / moments

Moments - Social video sharing platform

Home Page:https://next-moments.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Moments - Social video sharing platform

Live

homepage

Moments is a modern Social Media Website developed using React, Nextjs, TypeScript, and Sanity (database). This application includes the ability to upload, publish, share, comment on, and like videos; filter by categories and advanced search functionalities, profile pages, suggested accounts, custom responsive design, and much more. The user data is secure by default using next-auth session promoted with many OAuth services like Google/GitHub.

Technologies:

  • Next.js, TypeScript, TailwinCSS, Zustand, next-auth, OAuth2, JWT, GraphQL
  • Database: Sanity

Features:

  • Simple but secure login with Google/GitHub OAuth
  • Suggested users using suggest pool
  • Full security with next-auth session
  • Drag and drop video uploading
  • Upload new post
  • Update/Delete existing post (post's owner only)
  • Markdown supported for post content
  • Like functionality
  • View post comments
  • Real-time comment
  • Search functionality
  • View profile
  • Lazy loading
  • Infinite loading
  • Various APIs for fetching data
  • Mobile responsive

Demo

Post detail page: Detail

Profile detail page: Profile

Upload post: Drag Markdown

Search page: search

Mobile device:

MobileHome MobileProfile

APIs

GET https://next-moments.vercel.app/api/hello

GET https://next-moments.vercel.app/api/comment/{id}

GET https://next-moments.vercel.app/api/discover/{topic}

GET https://next-moments.vercel.app/api/post

GET https://next-moments.vercel.app/api/post/{id}

GET https://next-moments.vercel.app/api/profile/{id}

GET https://next-moments.vercel.app/api/profile/liked/{id}

GET https://next-moments.vercel.app/api/profile/video/{id}

GET https://next-moments.vercel.app/api/search/{searchTerm}

GET https://next-moments.vercel.app/api/suggested-user

Getting Started

This is a Next.js project bootstrapped with create-next-app.

Setting up enviroment variables

First, create a secret key for your application. You can quickly create a good value via this openssl command.

openssl rand -base64 32

For all the enviroment variables required, see .env.sample file

Start development

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on https://next-moments.vercel.app/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

About

Moments - Social video sharing platform

https://next-moments.vercel.app

License:Apache License 2.0


Languages

Language:TypeScript 93.6%Language:CSS 4.9%Language:JavaScript 1.4%