DEV Community

Pushkar Yadav
Pushkar Yadav

Posted on

Anomm - how i created an open source anonymous messaging service

ANOMM

ANOMM is a open source anonymous messaging service. It is a web app which allows you to send anonymous messages to anyone with a link. This delivers message directly to receiver's telegram account. It is a open source project and you can find the code here.

pushkarydv/anomm - GitHub

How I made it

Tech Stack

  • Next.js 13 (React.js framework)
  • Tailwind CSS
  • Telegram API
  • Firebase
  • Vercel
  • Rest API

How it works

  • Go to @anomm_bot on telegram and send /start command.

    • Sometime this bot link doesn't work so you can also search for @anomm_bot in telegram search bar and send /start command.
  • Visit anomm.pushkaryadav.in Press Get Started enter your telegram username.

  • It will check for recent request on server and will show you the link. It will also share the link to your telegram account.

  • Now you can share the link with anyone and they can send you anonymous messages which will be delivered into your telegram inbox via @anomm_bot.

How it is made

  • I registered a telegram bot via botfather and got the token.

  • I created a rest api which will send message to telegram bot via telegram api when user enters his username on the website. You can see the register bot api code here.

  • Then i created a message api which will send message to telegram bot via telegram api when user sends message to the link. You can see the message bot api code here.

  • Now all these api's only support cross origin based POST requests so only this website can send request to the apis.

  • I created dedicsted pages for all these api's to interact with frontend and backend. You can see the code here

  • All code is mentioned via comments in the code.

  • Now the things were hosted on vercel using firebase as database for storing just usernames and message counts so to protect user privacy. This is just an end to end service which makes it superfast and secure. If user is not connected to interned messages will be on telegram bot and will be delivered when user is connected to internet for 24 hours.

How to contribute

  • You can also contribute in making UI better, adding new features or fixing bugs.

  • You can also add new pages Refer Github Repository once as enviornment variables are by default limited to just production and you will need your's for that.

Conclusion

I hope you liked this project. If you have any suggestions or feedback please let me know in the comments. If you liked this project please share it with your friends and also follow me on twitter and github.

References

Telegram Bot API | Telegram Bot API Documentation | Next.js | Tailwind CSS | Firebase | Vercel

Author

Portfolio | Github | Twitter

Top comments (0)