Web app for sharing highlights to TikTok (test task)
View Demo
- Create config file
# .env
MONGO_CONNECTION_URI=mongodb+srv://...
PORT=3000
# SERVER_BASE_URL should match with TikTok OAuth uri
SERVER_BASE_URL=...
SERVER_JWT_SECRET=...
SERVER_SESSION_SECRET=...
TIKTOK_CLIENT_KEY=...
TIKTOK_CLIENT_SECRET=...
# Used for creating a tunnel via https://dash.cloudflare.com/
TUNNEL_TOKEN=...
- Run the container
docker-compose up
# create config file in the /back-end/.env
# /back-end
npm install
npm run start:dev
# /front-end
npm install
npm run start
- Serve static
- GET /*
- Get highlight's video source
- GET /api/v1/highlights/:highlightId
- Get JWT token
- GET /api/v1/auth/jwt
- Share highlight to TikTok
- POST /api/v1/highlights/:highlightId/share-to-tiktok
- requires Authorization header
- Start auth with TikTok
- GET /api/v1/auth/tiktok
- Handle TikTok OAuth callback
- GET /api/v1/auth/tiktok