Anomm - how i created an open source anonymous messaging service
Tags: github, nextjs, javascript, opensource
Published: 2023-03-17 10:19:41

## ANOMM

[ANOMM](https://anomm.pushkaryadav.in/) 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](https://github.com/pushkarydv/anomm).

[![pushkarydv/anomm - GitHub](https://gh-card.dev/repos/pushkarydv/anomm.svg)](https://github.com/pushkarydv/anomm)

## 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](https://t.me/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](https://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](https://t.me/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](https://github.com/pushkarydv/anomm/blob/master/pages/api/bot/register.js).

- 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](https://github.com/pushkarydv/anomm/blob/master/pages/api/message/index.js).

- 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](https://github.com/pushkarydv/anomm/tree/master/app)

- 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](https://github.com/pushkarydv/anomm) 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](https://twitter.com/pushkaryadavin) and [github](https://github.com/pushkarydv).

## References

[Telegram Bot API](https://core.telegram.org/bots/api) | [Telegram Bot API Documentation](https://core.telegram.org/bots/api#sendmessage) | [Next.js](https://nextjs.org/) | [Tailwind CSS](https://tailwindcss.com/) | [Firebase](https://firebase.google.com/) | [Vercel](https://vercel.com/)

## Author

[Portfolio](https://pushkaryadav.in/) | [Github](https://github.com/pushkarydv) | [Twitter](https://twitter.com/pushkaryadavin)