Skip to content

RCOM363/myst_txt

Repository files navigation

MystTxt

MystTxt is a fun and secure anonymous messaging platform built with Next.js. Create an account, share your unique link, and receive anonymous messages.

Built With

NextJs TypeScript Shadcn React Hook Form Zod Tailwind Axios MongoDB Mongoose Upstash Redis Resend Gemini

Features

  • User Authentication: Sign up and log in (NextAuth) to manage your anonymous messages.

  • Email Verification: Users must verify their email through OTP before accessing their dashboard.

  • Unique Shareable Link: Each user gets a unique link to receive anonymous messages.

  • Anonymous Messaging: Visitors can send messages anonymously without signing in.

  • AI Message Suggestions: Option to generate message suggestions using AI.

  • API Rate Limiting: To prevent spam and abuse of API endpoints

  • Unique Pageview counter: Tracks number of unique views (within 24hrs) to user's message page.

  • Language Profanity filter: Prevents people from using profane language.

API Documentation

User Signup

  • URL: /api/sign-up
  • Method: POST
  • Body:
{
    "username": "string"
    "email": "string"
    "password": "string"
}

Check Username

  • URL: /api/check-username?username="string"
  • Method: GET

Verify Code

  • URL: /api/verify-code
  • Method: POST
  • Body:
{
    "username": "string"
    "code": "string"
}

User Login (handled by next-auth)

  • URL: /api/auth/[...nextauth]
  • Method: POST
  • Body:
{
    "identifier": "string" //(username or email)
    "password": "string"
}

Accept Messages (GET)

  • URL: /api/accept-messages
  • Method: GET

Accept Messages (POST)

  • URL: /api/accept-messages
  • Method: POST
  • Body:
{
  "acceptMessages": "boolean"
}

Check Profanity (GET)

  • URL: /api/check-profanity
  • Method: GET

Check Profanity (POST)

  • URL: /api/check-profanity
  • Method: POST
  • Body:
{
  "checkProfanity": "boolean"
}

Get Messages

  • URL: /api/get-messages?page="number"&limit="number"
  • Method: GET

Delete Message

  • URL: /api/delete-message/:messageId
  • Method: DELETE

Delete Account

  • URL: /api/delete-account
  • Method: DELETE

Pageview (GET)

  • URL: /api/pageview
  • Method: GET

Pageview (POST)

  • URL: /api/pageview
  • Method: POST
  • Body:
{
  "username": "string"
}

Suggest Messages

  • URL: /api/suggest-messages
  • Method: POST

Send Message

  • URL: /api/send-message
  • Method: POST
  • Body:
{
    "username": "string"
    "content": "string"
}

Credits

This project was built by following a YouTube tutorial by Hitesh. You can check out the original tutorial here: Chai aur full stack NextJS.
I have completed the assignment & expanded on the project by making changes such as a revamped UI, responsive design, pagination, language profanity filter and more.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors