|
1 | 1 | # Welcome to GitpodFlix! 🎬 |
2 | 2 |
|
3 | | -Hey there, new team member! 👋 Welcome to GitpodFlix, where we're revolutionizing the streaming experience. We're thrilled to have you on board, and we've made sure your first day is as smooth as possible. |
| 3 | +Hey there, new team member! 👋 |
4 | 4 |
|
5 | | -## Table of Contents |
| 5 | +Welcome to GitpodFlix—providing the next generation of streaming experiences. |
6 | 6 |
|
7 | | -- [🚀 Getting Started is a Breeze](#-getting-started-is-a-breeze) |
8 | | - - [🎁 Why we use Gitpod](#-why-we-use-gitpod) |
9 | | - - [🎯 Your Development Environment](#-your-development-environment) |
10 | | -- [💻 Let's Start Coding](#-lets-start-coding) |
11 | | -- [🎬 See Your Changes Live](#-see-your-changes-live) |
12 | | -- [♻️ Connecting to Gitpod and running unit tests](#️-connecting-to-gitpod-and-running-unit-tests) |
13 | | -- [🔧 Development Environment Configuration](#-development-environment-configuration) |
14 | | - - [DevContainer](#devcontainer) |
15 | | - - [Automations](#automations) |
| 7 | +We're thrilled you joined. Let's get started on your first day. |
16 | 8 |
|
17 | | -### 🚀 Getting Started is a Breeze |
| 9 | +### At GitpodFlix we ship to production on your first day |
18 | 10 |
|
19 | | -We believe happy developers create better products, which is why we've eliminated the frustrating "works on my machine" syndrome that plagues traditional development. We've embraced Gitpod and this revolutionary approach means you can skip the tedious setup and start coding on day one - **yes, you can ship your first fix today!** |
| 11 | +We know happy developers create better products. At GitpodFlix we have **zero "works on my machine" issues** because of Gitpod. Onboarding is one-click to get a running environment with everything you need to ship new fixes and features today. |
20 | 12 |
|
21 | | -1. **Click this link** (or open the PR you were assigned) |
22 | | -2. **That's it!** Seriously, that's all you need to do. |
| 13 | +That's why we want you to **ship to production today**. |
23 | 14 |
|
24 | | -#### 🎁 Why we use Gitpod |
| 15 | +Let's get started with shipping your first fix. |
25 | 16 |
|
26 | | -What are the benefits of using Gitpod? |
| 17 | +## Getting Started |
27 | 18 |
|
28 | | -- You get the familiar interface of your favorite editor |
29 | | -- All the computing power you need without taxing your machine |
30 | | -- A consistent, reliable experience for every team member |
31 | | -- Dramatically reduced time from "I have an idea" to "I've shipped it" |
| 19 | +1. **Check your email** - You should have an email invite to join the GitpodFlix organization in Gitpod as well as a link for your first GitHub issue. |
| 20 | +2. **Go to the projects catalog at [app.gitpod.io/projects](https://app.gitpod.io/projects)** - Here you'll see a list of every project in the organization that you have access to. |
| 21 | +3. **Open up GitpodFlix** - Search "GitpodFlix" in the list and click **"Create environment"** to launch your first development environment. |
32 | 22 |
|
33 | | -Gitpod automatically handles all the tedious parts of development: |
| 23 | +And bingo, you have your first environment up and running. |
34 | 24 |
|
35 | | -- Creating your perfectly configured development environment |
36 | | -- Installing all dependencies and tools |
37 | | -- Setting up your entire development stack |
38 | | -- Configuring services, databases, and infrastructure |
39 | | -- Ensuring everything is ready for you to start coding immediately |
| 25 | + |
40 | 26 |
|
41 | | -#### 🎯 Your Development Environment |
| 27 | +Here you have in your environment: |
42 | 28 |
|
43 | | -Welcome to your new environment! You'll notice that: |
| 29 | +1. All your dependencies |
| 30 | +2. The database running |
| 31 | +3. The backend API running |
| 32 | +4. Your web server started |
44 | 33 |
|
45 | | -- **Everything is ready to go** - All tools and configurations are set up |
46 | | -- **Your code is already there** - The repository is cloned and configured |
47 | | -- **Your favorite editor is waiting** - Use VS Code, JetBrains, or any editor you prefer |
48 | | -- **All services are running** - Our microservices are up and available |
| 34 | +## Making a code change |
49 | 35 |
|
50 | | -Our tech stack is: |
| 36 | +Now in the top right you can choose your favourite editor, whether that's IntelliJ, VS Code or even Cursor. |
51 | 37 |
|
52 | | -- **Frontend**: React, D3.js |
53 | | -- **Backend**: Node.js, Express |
54 | | -- **Database**: PostgreSQL |
55 | | -- **Testing**: Jest |
56 | | -- **Visualization**: D3.js |
| 38 | + |
57 | 39 |
|
58 | | -### 💻 Let's Start Coding |
| 40 | +Your environment will automatically connect. |
59 | 41 |
|
60 | | -No matter which editor you use, we support it through Gitpod. |
| 42 | + |
61 | 43 |
|
62 | | -Simply go to the Gitpod interface and select your preferred editor: |
| 44 | +Here you have: |
63 | 45 |
|
64 | | -- VS Code (in browser or desktop) |
65 | | -- JetBrains IDEs |
66 | | -- Cursor |
67 | | -- Windsor |
68 | | -- Or any terminal-based editor |
| 46 | +- All the source code in your favourite editor |
| 47 | +- Your running web server on `localhost:3000` |
| 48 | +- Your running ports for your API, database, etc |
| 49 | +- All authenticated with your GitHub account |
| 50 | +- A powerful environment secure in your corporate network |
69 | 51 |
|
70 | | -Just choose what works best for you and start coding right away! |
| 52 | +> **Tip:** Let's rename "Gitpod Flix" to our name by updating `frontend/src/components/Navbar.jsx`. Watch the web server live reload the change. |
71 | 53 |
|
72 | | -### 🎬 See Your Changes Live |
| 54 | +Now you're ready to code. |
73 | 55 |
|
74 | | -To see the GitpodFlix platform in action: |
| 56 | +### Explore your development environment |
75 | 57 |
|
76 | | -1. Open [http://localhost:3000/](http://localhost:3000/) in your browser to see the frontend |
77 | | -2. Open [http://localhost:3002/api/movies](http://localhost:3002/api/movies) to see the movies API |
78 | | -3. Make changes and see them reflected immediately |
| 58 | +Now you're setup why not explore: |
79 | 59 |
|
80 | | -It feels just like local development, but everything is running in your Gitpod environment. |
| 60 | +1. Running a database clear and seed "automation" from the Gitpod UI |
| 61 | +2. Connecting to your environment with the CLI `gitpod environment ssh` |
| 62 | +3. Adding dotfiles for your personal preferences |
81 | 63 |
|
82 | | -### ♻️ Connecting to Gitpod and running unit tests |
| 64 | +## ✨ How does this magic work? |
83 | 65 |
|
84 | | -From outside your environment: |
| 66 | +### Dev Container |
85 | 67 |
|
86 | | -```bash |
87 | | -# List available environments |
88 | | -gitpod environments list |
| 68 | +All of the dependencies are defined in the `devcontainer.json` file. Your platform team has configured a base image with all of your platform tooling ready to go. Any time platform tooling updates the next environment you open will automatically have the latest tooling. |
89 | 69 |
|
90 | | -# SSH into the environment |
91 | | -gitpod ssh <workspace-id> |
| 70 | +Here's a simplified version of how that looks: |
92 | 71 |
|
93 | | -# Run tests using automation |
94 | | -gitpod automations task start runTests |
| 72 | +```json |
| 73 | +{ |
| 74 | + "name": "GitpodFlix Dev Environment", |
| 75 | + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", |
| 76 | + "features": { |
| 77 | + "ghcr.io/devcontainers/features/node:1": {}, |
| 78 | + "ghcr.io/warrenbuckley/codespace-features/sqlite:1": {} |
| 79 | + }, |
| 80 | + "forwardPorts": [ |
| 81 | + 3000, |
| 82 | + ... |
| 83 | + ], |
| 84 | + "postCreateCommand": ".devcontainer/setup.sh", |
| 85 | + "customizations": { |
| 86 | + "vscode": { |
| 87 | + "extensions": [ |
| 88 | + "dbaeumer.vscode-eslint", |
| 89 | + ... |
| 90 | + ] |
| 91 | + } |
| 92 | + } |
| 93 | +} |
95 | 94 | ``` |
96 | 95 |
|
97 | | -From inside your environment: |
| 96 | +This includes: |
98 | 97 |
|
99 | | -```bash |
100 | | -# Run tests using automation |
101 | | -gitpod automations task start runTests |
| 98 | +1. Dependencies like SQLite and Node.JS |
| 99 | +2. Configurations of ports to forward |
| 100 | +3. A script for additional dependencies and setup |
| 101 | +4. Customizations for your editor |
| 102 | + |
| 103 | +### Automations |
| 104 | + |
| 105 | +Your team have configured automations in `.gitpod/automations.yaml`. |
| 106 | + |
| 107 | +Here's a simplified version of how that looks: |
| 108 | + |
| 109 | +```yaml |
| 110 | +services: |
| 111 | + catalog: |
| 112 | + name: "GitpodFlix Web Server" |
| 113 | + triggeredBy: |
| 114 | + - postEnvironmentStart |
| 115 | + commands: |
| 116 | + start: | |
| 117 | + cd /workspaces/flex-demo/frontend |
| 118 | + PORT=3001 npx nodemon src/index.ts |
| 119 | +
|
| 120 | +tasks: |
| 121 | + seedDatabase: |
| 122 | + name: "Seed Database" |
| 123 | + description: "Seed the database with sample movies in a dramatic sequence" |
| 124 | + triggeredBy: |
| 125 | + - manual |
| 126 | + - postEnvironmentStart |
| 127 | + command: | |
| 128 | + PGPASSWORD=gitpod psql -h localhost -U gitpod -d gitpodflix -f seeds/01_seed_trending.sql |
102 | 129 | ``` |
103 | 130 |
|
104 | | -## 🔧 Development Environment Configuration |
| 131 | +This includes: |
105 | 132 |
|
106 | | -### DevContainer |
| 133 | +- Configurations to start your webservers, databases and microservices |
| 134 | +- Automated tasks to seed your database, run tests, etc |
107 | 135 |
|
108 | | -The development environment configuration lives in `.devcontainer/devcontainer.json`. This file defines: |
| 136 | +All of these are setup to be self-serve and automatically configured. **If anything every breaks, simply delete your environment and create a new one.** |
109 | 137 |
|
110 | | -- All required dependencies and packages |
111 | | -- Development tools and extensions |
112 | | -- Environment variables |
113 | | -- Container settings |
| 138 | +## FAQs |
114 | 139 |
|
115 | | -To add new dependencies or development tools: |
| 140 | +### Can I run multiple environment at once? |
116 | 141 |
|
117 | | -1. Edit `.devcontainer/devcontainer.json` |
118 | | -2. Add your new packages to the appropriate section |
119 | | -3. Restart your development container to apply changes |
| 142 | +Yes. |
120 | 143 |
|
121 | | -### Automations |
| 144 | +### What happens if the environment stops? |
| 145 | +
|
| 146 | +Your code is saved—restart to continue working. |
| 147 | +
|
| 148 | +### How do I access logs for my running services? |
| 149 | +
|
| 150 | +Either: |
| 151 | +
|
| 152 | +1. In the editor "terminals" view |
| 153 | +2. With the Gitpod CLI (inside or outside your environment) |
| 154 | +
|
| 155 | +### How do I customize my environment? |
| 156 | +
|
| 157 | +With dotfiles in your user profile. |
| 158 | +
|
| 159 | +### What if I need a new project? |
| 160 | +
|
| 161 | +Simply create a new one in the Gitpod UI. |
122 | 162 |
|
123 | | -The automation configuration is defined in `.gitpod/automations.yaml`. This file contains: |
| 163 | +### Can I connect via SSH? |
124 | 164 |
|
125 | | -- Microservice definitions and configurations |
126 | | -- Development workflows |
127 | | -- Automated tasks and scripts |
128 | | -- Environment setup procedures |
| 165 | +Yes via the Gitpod CLI. |
129 | 166 |
|
130 | | -To add a new microservice or automation: |
| 167 | +### How do I increase my machine size? |
131 | 168 |
|
132 | | -1. Edit `.gitpod/automations.yaml` |
133 | | -2. Define your new service or automation |
134 | | -3. Follow the existing patterns for consistency |
135 | | -4. Test your changes in a development environment |
| 169 | +Projects are configured with a specific machine size that's perfect to use. Admins can update defauls or create a new project with a different size. |
0 commit comments