An TikTok-like app

Overview

Video-app

An TikTok likes app

Middleware and db

all tools below installed by docker please make sure you have installed docker in your machine

tool version docker download
rabbitmq 3.8.5 docker pull rabbitmq:3.8.5
redis 3.2 docker pull redis:3.2
mongodb latest docker pull mongo
minio latest docker pull minio/minio
nacos latest docker pull nacos/nacos-server
mysql 5.7 docker pull mysql:5.7
JDK 1.8 https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Structure

video-app
  ├── api -- controller
  ├── common -- common tools package and configuration, interceptor
  ├── mapper -- dao, mapper of service
  ├── model -- pojos, VO, BO, MO(mongo document)
  ├── mybatis-generator
  └── service -- the services of the project

How to start

  1. Install all tools needed in this project

    # enter all this in your machine
    
    # docker install mysql
    docker pull mysql:5.7
    docker run -p 3306:3306 --name mysql -v /mydata/mysql/log:/var/log/mysql -v /mydata/mysql/data:/var/lib/mysql -v /mydata/mysql/conf:/etc/mysql -v /mydata/mysql/conf/my.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7
    
    # docker install redis
    docker pull redis:3.2
    docker run -p 6379:6379 --name redis -v /mydata/redis/data:/data -d redis:3.2 redis-server --appendonly yes
    
    # docker install rabbitmq
    docker pull rabbitmq:3.8.5
    docker run -d --name rabbitmq --publish 5671:5671 --publish 5672:5672 --publish 4369:4369 --publish 25672:25672 --publish 15671:15671 --publish 15672:15672 rabbitmq:3.8.5
    
    # docker install mongo
    docker pull mongo
    docker run -p 27017:27017 --name mongo -v /mydata/mongo/db:/data/db -d mongo
    
    # docker install mongo
    docker pull minio/minio
    docker run -p 9000:9000 -p 9001:9001 --name minio  -e "MINIO_ROOT_USER=root"  -e "MINIO_ROOT_PASSWORD=root123456" -v /mydata/minio/data:/data   -v /mydata/minio/config:/root/.minio   -d minio/minio server /data --address :9000 --console-address :9001
    
    # docker install nacos
    # when install nacos, please make sure your machine have enough memory. If memory not enough, you can adjust the 'JVM_XMS' and 'JVM_XMX' to 256m
    docker pull nacos/nacos-server
    docker run -e JVM_XMS=512m -e JVM_XMX=512m --env MODE=standalone --name nacos -d -p 8848:8848 nacos/nacos-server
  2. Download the git project and open it in Intellj Idea, use maven to install all dependencies.

  3. Change all configs in 'api/src/main/resources/application-dev.yml' and 'api/src/main/resources/application-prod.yaml' , the ip address of MINIO should be the public address if you deploy the project on Cloud Server.

  4. Also change the configs in 'api/src/main/resources/bootstrap.yml'

  5. First 'clean' and then 'install' the project in 'shortVideo(root)' :

  6. After installing, you can find out the ".jar" file in "api/target/video-app.jar", upload it to your machine, and enter command below to your console:

    nohup java -jar video-app.jar >my.log 2>&1 &

Mysql configuration

Please make sure your mysql set the encoding correctly.

The encoding should be 'utf8mb4', if not mysql can not save emoji

You can do as below if you use docker

# first install mysql
docker pull mysql:5.7
docker run -p 3306:3306 --name mysql -v /mydata/mysql/log:/var/log/mysql -v /mydata/mysql/data:/var/lib/mysql -v /mydata/mysql/conf:/etc/mysql -v /mydata/mysql/conf/my.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7

# stop rm the container
docker stop mysql
docker rm mysql

# go into the mysql dir
cd /mydata/mysql
rm -rf conf
mkdir conf
cd conf
vi my.cnf

# paster the configs below and save it in the 'my.cnf'
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
#!includedir /etc/mysql/conf.d/
#!includedir /etc/mysql/mysql.conf.d/

# rerun the mysql in docker
docker run -p 3306:3306 --name mysql -v /mydata/mysql/log:/var/log/mysql -v /mydata/mysql/data:/var/lib/mysql -v /mydata/mysql/conf:/etc/mysql -v /mydata/mysql/conf/my.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7

Front End

Soon....

Demo

show

show

You might also like...

The goal of the project is to create a web application using Java EE and database (PostgreSQL) without connecting a modern technology stack like spring boot and hibernate

The goal of the project is to create a web application using Java EE and database (PostgreSQL) without connecting a modern technology stack like spring boot and hibernate

About The Project SignIn page SignUp page Profile page The goal of the project is to create a web application using Java EE and database (PostgreSQL)

Mar 23, 2022

Twitter like web application

Sweater Twitter like web application Read Me First The following was discovered as part of building this project: The original package name 'io.github

Feb 1, 2022

CRUD about create, update and delete items like fish and fishbowl

CRUD about create, update and delete items like fish and fishbowl

CreacionPecesYPeceras Este repositorio contiene el código fuente y la base de datos (fichero .sql) que conforman una aplicación CRUD (Create, Read, Up

Mar 2, 2022

Some recent questions asked in interviews of companies like Google, TCS, Amazon etc.

Some recent questions asked in interviews of companies like Google, TCS, Amazon etc.

Nov 21, 2022

Like JPremium, but free, open-source and multiplatform

LibrePremium This plugin was originally made for BeeGames, however they stepped down after the work was done. They are forbidden to use this plugin. L

Dec 30, 2022

Discourse-java is a platform where users can freely discuss on topics they want to, and like-minded people can join in and contribute

Discourse-java is a platform where users can freely discuss on topics they want to, and like-minded people can join in and contribute

Discourse is the 100% open source discussion platform built for the next decade of the Internet. Use it as a: mailing list discussion forum long-form

Oct 19, 2022

Imports waypoints from DCS F10 map into the plane navigation system, like a Data Transfer Cartidge.

Imports waypoints from DCS F10 map into the plane navigation system, like a Data Transfer Cartidge.

DCSTheWay Imports waypoints from DCS F10 map into the plane navigation system, like a Data Transfer Cartridge. Special thanks to kukiric for helping o

Dec 27, 2022

A lightweight, mixin like injection lib using ASM

ClassTransform A lightweight, mixin like injection lib using ASM. The usage is like Mixins. You can almost copy-paste mixins code and it works. Why? I

Dec 22, 2022

SecureDB is an extension for Ai2 Appinventor and its distros which stores the data in the form of key and value just like TinyDB but in a more secure manner.

SecureDB is an extension for Ai2 Appinventor and its distros which stores the data in the form of key and value just like TinyDB but in a more secure manner.

SecureDB SecureDB is an extension for Ai2 Appinventor and its distros which stores data for your app in a secure format locally on user's device. Expl

Sep 24, 2022
Owner
Jonathan Lau
Jonathan Lau
PortalController - A rudimentary TeamViewer-like remote control app for Android, using ws.

PortalController A TeamViewer-like app for Android-to-Android remote control, using node.js and websockets (ws). Some insight The reason I call it rud

Mike Anderson 10 Dec 15, 2022
Spring Boot microservices app with Spring Cloud, Robust and resilient backend managing e-Commerce app

e-Commerce-boot μServices Important Note: This project's new milestone is to move The whole system to work on Kubernetes, so stay tuned. Introduction

Selim Horri 65 Dec 23, 2022
This app corrects your sitting posture and provides feedback in real time in conjunction with the app. A sensor of 31 cells detects your posture to get better life-wellness

Notichair 실시간 자세분석 및 교정 스마트체어 ?? 상명대학교 PRIME 경진대회 수상 ?? 요구사항 31-cell sensor (mdxs-16-5610) 목차 1. 소개 프로젝트 내용 소개 2. 개발 환경 사전 설정 및 환경 구축 3. 기능 Sensors Ap

Minuk_LEE 3 Jan 15, 2022
An implementation of a sample E-Commerce app in k8s. This online retail marketplace app uses Spring Boot, React, and YugabyteDB.

An implementation of a sample E-Commerce app in k8s. This online retail marketplace app uses Spring Boot, React, and YugabyteDB.

yugabyte 1 Oct 27, 2022
Provides some Apple Wallet functionality, like adding passes, removing passes and checking passises for existing.

react-native-wallet-manager Provides some Apple Wallet's functionality, like adding passes, removing passes and checking passises for existing. Instal

dev.family 50 Nov 12, 2022
Querystream - Build JPA Criteria queries using a Stream-like API

QueryStream QueryStream allows you to perform JPA queries using a Stream-like API. Just like a Java 8 Stream, a QueryStream is built up in a pipeline,

null 11 Sep 24, 2022
SurvivalCore featuring SMP features like claims and land protection for Nukkit!

SurvivalCore SurvivalCore featuring Survival characterstics and claims and land protection for Nukkit! Features: Claims System : Use /claim or /c to c

OP Heroes Development Team 1 Jan 4, 2022
Rails like error pages for Spring Boot applications that are only active in development.

Better Error Pages Table of Contents Introduction Demo Quick Start Configuration Limitations License Introduction This is a Spring Boot Starter projec

Kod Gemisi 13 Jan 2, 2022
The combined power of JUnit, Guice and Mockito. Plus it sounds like a cool martial art.

The combined power of JUnit, Guice and Mockito. Plus it sounds like a cool martial art. So you started using dependency injection because somebody tol

Arcbees 270 Sep 19, 2022
An open source civilization like game made in LibGDX

OpenCiv A turn based strategy game built on LibGDX, with a rouge-like tile set. About OpenCiv is a love letter to turn based strategy games inspired b

Rhin 58 Dec 26, 2022