Coder Social home page Coder Social logo

test_friendship's Introduction

Frienship Test

Put your friendships to the test! Create a quiz about your preferences, share it with your friends, and find out how well they know you. Strengthen your bonds as you discover who's on the same wavelength. Play now!

Try it out: https://t.me/friendship_testing_bot

About this app

Friendship Test is a simple Telegram Mini App, in it's source code developers can find sharing, working with direct links to content in app, multipages, forms, navigation in mini app format, modal windows, data storage in a database, API and interaction with a Telegram bot.

Stack

We tried to implement the project with minimal use of third-party packages. All components and styles are written by us except the carousel and icons.

  • Node (Web server)
  • Express (Web server framework)
  • node-telegram-bot-api (Package for interactions with Telegram Bot API)
  • express-rate-limit (Package for rate control to limit repeated requests)
  • express-openapi-validator (Package for automatic validation of API requests and responses using an OpenAPI 3 specification)
  • MongoDB (database)
  • React (Frontend framework)
  • @vkontakte/icons (Package with svg icons as react components)
  • react-responsive-carousel (Carousel component for react)

Setup

You need to have Node.js and MongoDB installed. Clone this repository or download zip file.

Frontend

  1. Open frontend folder
  2. Install dependencies: npm install
  3. Run the app: npm start
  4. App should be ready on port "3006"

Backend

  • Open backend folder
  • Copy .example.env to .env and fill it properly (see configuration)
  • Install dependencies: npm install
  • Run the app: node index.js
  • App should be ready on port from .env file

Configuration

For the minimal configuration, the following settings need to be changed in the .env-file:

  • PORT - port where backend will be run
  • HOST - ip address or domain (write localhost if you run it locally, otherwise make sure you have SSL certificates for HTTPS connection)
  • DB_HOST - mongodb host
  • DB_USER - mongodb user
  • DB_PASSWORD - mongodb password for user
  • DATABASE - the database name
  • BOT_TOKEN - your Telegram bot token
  • APP_URL - your Telegram Mini App URL

Documentation

Our code is completely documented so you can easily figure it out. The api is fully described in openapi.yaml file, you can also view it here (created with Redoc).

  • Backend documentation can be found in BACKEND.md

test_friendship's People

Contributors

dkozl50 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.