• Stars
    star
    842
  • Rank 52,778 (Top 2 %)
  • Language
    TypeScript
  • Created 10 months ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Your coding year in review
readme

Try it out live: GitHubUnwrapped.com

A platform that generates a year-in-review video for each GitHub user. Built with Vite 5, Remotion and AWS Lambda.

Make your own

Want to make your own year-in-review for your users?

  • Developers: Feel free to fork and use this repository as a template! Note the legal disclaimers at the bottom of this README.
  • Non-developers: Write to [email protected] for a free consultation in Fall 2024!

Setup

  1. Run npm i to install dependencies.

  2. Rename .env.example to .env

  3. Set up your AWS account according to the Remotion Lambda - Setup guide. We use multiple accounts for load-balancing:

    • Use AWS_KEY_1 instead of REMOTION_AWS_ACCESS_KEY_ID and AWS_SECRET_1 instead of REMOTION_AWS_SECRET_ACCESS_KEY.
    • You can use AWS_KEY_2 and AWS_SECRET_2 to load-balance between two accounts, or paste the same credentials as before to use the same account.
    • In src/helpers/set-env-for-key.ts, we rotate the environment variables.
  4. Deploy the functions into your AWS account(s):

    npx tsx deploy.ts
    

    Note that some AWS regions are disabled by default. If you get an error, enable them or limit yourself to only default ones.

  5. For caching the videos and GitHub API responses, set up a MongoDB (we use a free MongoDB Atlas Cloud instance) to save the videos. Set the connection string by filling out the values in .env.

  6. For fetching data from GitHub, create a personal access token in your user settings (no need to grant any scopes, the GraphQL API needs to be authenticated to get public information) and set it as GITHUB_TOKEN_1. Adding more tokens GITHUB_TOKEN_2 etc. will rotate the personal access tokens.

  7. Provide DISCORD_CHANNEL and DISCORD_TOKEN values to send monitoring logs to Discord.

  8. Add a SENTRY_DSN environment variable to get error reports.

You now have all environment variables.

Run the web app:

npm run dev

Edit the template in the Remotion Studio:

npm run remotion

To deploy, connect your repository to Render. Don't forget to also set the environment variables there too.

Scaling strategy

To allow thousands of people to render their video at the same time, we applied multiple strategies for scaling:

  • Caching the video whenever possible. Before each render, a MongoDB database lock is created to avoid multiple renders for the same GitHub user to be accidentally created.
  • Renders are distributed across an array of AWS regions and accounts to prevent hitting the concurrency limit.

Credits

We thank GitHub and For One Red for their support in realization and promoting of this project.

Audio copyright disclaimer

The audio was licensed for GitHubUnwrapped.com from SmartSound. If you create a derivative project, you must contact them for licensing.

License

The code in this repository: Licensed under MIT.
The Remotion framework (a dependency of this project): Companies need to obtain a paid license. Read the terms here.

More Repositories

1

remotion

πŸŽ₯ Make videos programmatically with React
TypeScript
19,525
star
2

github-unwrapped-2022

Your coding year in review #GitHubUnwrapped
TypeScript
1,321
star
3

trailer

The promo video for Remotion
TypeScript
1,033
star
4

template-three

βš›οΈ πŸŽ₯ 3️⃣ A minimal boilerplate for Remotion + React Three Fiber
TypeScript
66
star
5

template-next-app-dir

Next.js template for programmatic video apps
TypeScript
60
star
6

template-tiktok

Generate TikTok-style captions with Whisper.cpp
TypeScript
54
star
7

github-unwrapped-2021

The source code for #GitHubUnwrapped 2021
TypeScript
47
star
8

template-next-pages-dir

Next.js template for programmatic video apps
TypeScript
30
star
9

template-helloworld

Starting point for a new Remotion project. Run `npm init video` to get this template!
TypeScript
27
star
10

template-still

Create still images with Remotion
TypeScript
26
star
11

typewriter

A basic Typewriter effect.
TypeScript
26
star
12

brand

Logo and brand elements of Remotion, created in Remotion.
TypeScript
23
star
13

mapbox-example

Remotion Mapbox example
TypeScript
21
star
14

trailer-2-0

TypeScript
20
star
15

react-native-demo

TypeScript
20
star
16

template-skia

A Remotion starter template with React Native Skia included
TypeScript
15
star
17

apple-wow-tutorial

Recreate an Apple animation in Remotion!
TypeScript
14
star
18

template-remix

A Remotion SaaS template with Remix + Remotion Lambda
TypeScript
13
star
19

template-tailwind

Remotion starter template with Tailwind installed
TypeScript
13
star
20

gl-transitions

TypeScript
12
star
21

transitions-video

Promo video for @remotion/transitions
TypeScript
12
star
22

motion-blur-example

Example of Motion Blur
TypeScript
10
star
23

template-helloworld-javascript

Starting point for a new Remotion project in plain JS. The Hello World template, but in plain JavaScript. Recommended for people who detest TypeScript.
JavaScript
10
star
24

text-warping

Demo of the capabilities of the new warpPath() API!
TypeScript
10
star
25

morph-text

Morph Text in Remotion
TypeScript
9
star
26

anime-example

Example of using Anime.JS in Remotion
TypeScript
9
star
27

trailer-lambda

TypeScript
9
star
28

4-0-trailer

The intro for the Remotion 4.0 keynote and some overlays for it
TypeScript
9
star
29

d3-example

An example for D3.JS in Remotion
TypeScript
8
star
30

shorts-customizer

TypeScript
8
star
31

3d-text

TypeScript
7
star
32

tone-js-example

A small song with Remotion + Tune.JS
TypeScript
7
star
33

three-particles

Remotion adaptation of https://github.com/winkerVSbecks/3d-particle-effects-demo as reqeusted in Discord
TypeScript
6
star
34

library-starter

Starter template for creating your own Remotion library
TypeScript
5
star
35

css-animation-play-state

Controlling CSS animations from Remotion
TypeScript
5
star
36

chrome-build-instructions

Python
4
star
37

video-with-jump-cuts

Use a video and cut out portions of it without re-mounting the video inbetween.
TypeScript
4
star
38

rust-ffmpeg-splitter

FFmpeg as a binary and with Rust bindings
C
4
star
39

template-overlay

A template for making overlays for use in traditional video editing programs
TypeScript
4
star
40

remotion-three-gltf-example

Demo using useGLTF
TypeScript
4
star
41

lambda-binaries

Binaries for Remotion Lambda
Shell
3
star
42

the-dashboard

Our and @ForOneRed's office dashboard
TypeScript
3
star
43

spring-editor

TypeScript
3
star
44

timing-functions

Source code for the video about timing functions
TypeScript
3
star
45

template-next-app-dir-tailwind

Official Remotion+NextJS+TailwindCSS template
TypeScript
3
star
46

p5-poc

P5.js proof of concept
TypeScript
2
star
47

glb-example

Animate a .glb model in React Three Fiber
TypeScript
2
star
48

lambda_go_sdk

Go library for invoking Remotion Lambda
Go
2
star
49

homebrew-crosstools

Cross-compiling toolchains for macOS.
Ruby
2
star
50

video-buffering-example

Pause the video if content is buffering, and resume once it has finished loading
TypeScript
1
star
51

dvd-logo

Extremely simple DVD Logo implementation
TypeScript
1
star
52

light-leak-example

TypeScript
1
star