This is the Telegram Mini App Sticker Catalog.
Huge catalog of sticker packs for Telegram for every taste in one application. A large and convenient set of various and unique stickers for their quick and easy search and installation.
- Live demo: Sticker Catalog
- Bot source code: fStikBot
- Smart search for stickers: Find the perfect sticker with ease by searching for it by name, description, or tags
- Automatic catalog replenishment: Discover new stickers every day with our automatic catalog replenishment feature
- Recommendations based on current trends: Stay up-to-date with the latest trends by checking out our recommendations
- Rating system: Help us promote the best sticker packs by rating them and contributing to the overall ranking
- Support for animated stickers: Bring your conversations to life with our support for animated stickers
- Display of similar sticker packs: Discover new sticker packs that you’ll love based on your likes and open sticker packs
- To get started with the client-side, you'll need to have Node.js 16.16.0 or higher and npm installed on your machine. You can download them from here
- We recommend using the latest LTS version
Go to the client directory:
cd client
Set the following environment variables in a .env file or in your shell:
Variable | Description |
---|---|
VITE_API_URL | API server url |
To install the dependencies, run:
npm install
To start the dev-server, run:
npm run dev
The dev-server will start listening on port 5173
by default.
To build the project, run:
npm run build
- To get started with the API, you'll need to have Node.js and npm installed on your machine. You can download them from here
- We recommend using the latest LTS version
- You definitely need a cloud database MongoDB Atlas
- You'll also need a Redis database for caching
- You can get one by signing up here or by installing it locally
- You'll also need a Telegram bot token. You can get one by talking to BotFather
- Visit this page for more information
- Once you have all of that, you can clone the repository
- You can do that by running
git clone https://github.com/fstik-app/catalog
in your terminal or by downloading the repository as a zip archive - You can also set them in your shell or in your hosting provider's dashboard
- You can do that by running
Why MongoDB Atlas?
The catalog is based on full-text search Atlas Search and MongoDB Atlas is the only way to use it. You can use MongoDB Atlas for free, but you'll need to provide your credit card details. You won't be charged anything unless you upgrade to a paid plan. You can read more about Atlas Search here.
How to set up MongoDB Atlas?
- Sign up for MongoDB Atlas here
- Create a new project
- Create a new cluster
- Go to the cluster's settings and click on "Database Access"
- Create a new user with the "Atlas admin" role
- Go to the cluster's settings and click on "Network Access"
- Add your IP address to the whitelist
- Go to the cluster's settings and click on "Clusters"
- Click on "Connect" and then on "Connect your application"
- Copy the connection string and replace the
<password>
placeholder with the password of the user you created in step 5 - Set the
MONGODB_URI
environment variable to the connection string
Import sample data
We provide a sample date for the minimum functionality of the catalog to work. You can download it here.
Follow the instructions here to import the data into your cluster.
Go to the server directory:
cd server
Set the following environment variables in a .env file or in your shell:
Variable | Description |
---|---|
NODE_ENV | The environment to run the API in. Can be one of development or production . Defaults to development . |
PORT | The port to run the API on. Defaults to 3000 . |
BOT_TOKEN | The Telegram bot token. |
MONGODB_URI | The MongoDB connection URI. |
ATLAS_MONGODB_URI | The MongoDB Atlas connection URI. |
SESSION_SECRET | The session secret. |
REDIS_PREFIX | The Redis key prefix. |
To install the dependencies, run:
npm install
To start the API, run:
npm start
The API will start listening on port 3000
by default.
We recommend using PM2 to run the API in production.
Link to the API documentation: API_DOCS.md
For checking if a sticker set contains NSFW stickers, we use a nsfw checker service.
This is a Node.js script that checks Telegram sticker sets for NSFW content using the nsfwjs
library. It also uses the Telegram Bot API to retrieve information about the sticker sets and the sharp
library to process images.
Usage
- Clone the repository
- Run
npm install
- Create a
.env
file with the following contents:
BOT_TOKEN=<your bot token>
MONGODB_URI=<your MongoDB URI>
ATLAS_MONGODB_URI=<your MongoDB Atlas URI>
- Run
npm start
How it works
The script runs indefinitely, periodically checking for new sticker sets to moderate. When it finds a sticker set to moderate, it will download the stickers and check them for NSFW content. If the set contains too much NSFW content, it will mark the set as unsafe and prevent it from being published.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details
- Telegram for creating the Telegram Mini App platform