• Stars
    star
    1,318
  • Rank 34,438 (Top 0.7 %)
  • Language
    TypeScript
  • Created over 1 year ago
  • Updated about 1 year 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 #GitHubUnwrapped

Try it out live: GitHubUnwrapped.com

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

Make your own

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

  • Developers: Feel free to fork 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 2023!

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/set-env-for-key.ts, we rotate the environment variables.
  4. Deploy the functions into your AWS account(s):

    npx ts-node 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 as MONGO_URL.

  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. Optionally, provide DISCORD_CHANNEL and DISCORD_TOKEN values to send monitoring logs to Discord.

You now have all environment variables.

Run the web app:

npm run dev

Edit the template in the Remotion preview:

npm run preview

To deploy, connect your repository to Vercel.

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 avoid hitting the concurrency limit.

Credits

We thank GitHub for their support in realization and promotion of this project.

Music copyright disclaimer

The music was licensed for GitHubUnwrapped.com specifically. If you create a derivative project, you may not use it.

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,269
star
2

trailer

The promo video for Remotion
TypeScript
1,030
star
3

github-unwrapped-2023

Your coding year in review
TypeScript
823
star
4

template-three

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

github-unwrapped-2021

The source code for #GitHubUnwrapped 2021
TypeScript
47
star
6

template-next-app-dir

Next.js template for programmatic video apps
TypeScript
46
star
7

template-next-pages-dir

Next.js template for programmatic video apps
TypeScript
27
star
8

template-still

Create still images with Remotion
TypeScript
25
star
9

template-helloworld

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

brand

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

typewriter

A basic Typewriter effect.
TypeScript
21
star
12

trailer-2-0

TypeScript
20
star
13

react-native-demo

TypeScript
19
star
14

mapbox-example

Remotion Mapbox example
TypeScript
18
star
15

template-skia

A Remotion starter template with React Native Skia included
TypeScript
13
star
16

template-remix

A Remotion SaaS template with Remix + Remotion Lambda
TypeScript
12
star
17

template-tailwind

Remotion Starter template with Tailwind installed
TypeScript
11
star
18

transitions-video

Promo video for @remotion/transitions
TypeScript
11
star
19

apple-wow-tutorial

Recreate an Apple animation in Remotion!
TypeScript
11
star
20

motion-blur-example

Example of Motion Blur
TypeScript
10
star
21

remotion-gl-transitions

TypeScript
10
star
22

template-tiktok

Generate TikTok-style captions with Whisper.cpp
TypeScript
10
star
23

text-warping

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

template-helloworld-javascript

JavaScript
9
star
25

4-0-trailer

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

morph-text

Morph Text in Remotion
TypeScript
8
star
27

anime-example

Example of using Anime.JS in Remotion
TypeScript
8
star
28

d3-example

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

trailer-lambda

TypeScript
8
star
30

3d-text

TypeScript
7
star
31

tone-js-example

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

shorts-customizer

TypeScript
6
star
33

three-particles

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

css-animation-play-state

Controlling CSS animations from Remotion
TypeScript
5
star
35

library-starter

Starter template for creating your own Remotion library
TypeScript
4
star
36

rust-ffmpeg-splitter

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

remotion-three-gltf-example

Demo using useGLTF
TypeScript
4
star
38

lambda-binaries

Binaries for Remotion Lambda
Shell
3
star
39

chrome-build-instructions

Python
3
star
40

the-dashboard

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

template-overlay

A template for making overlays for use in traditional video editing programs
TypeScript
3
star
42

template-next-app-dir-tailwind

Official Remotion+NextJS+TailwindCSS template
TypeScript
3
star
43

p5-poc

P5.js proof of concept
TypeScript
2
star
44

video-with-jump-cuts

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

glb-example

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

lambda_go_sdk

Go library for invoking Remotion Lambda
Go
2
star
47

dvd-logo

Extremely simple DVD Logo implementation
TypeScript
1
star
48

video-buffering-example

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

spring-editor

TypeScript
1
star