|
1 | | -<div align="center"> |
2 | | - <h1 align="center"><a href="https://www.epicweb.dev/epic-stack">The Epic Stack 🚀</a></h1> |
3 | | - <strong align="center"> |
4 | | - Ditch analysis paralysis and start shipping Epic Web apps. |
5 | | - </strong> |
6 | | - <p> |
7 | | - This is an opinionated project starter and reference that allows teams to |
8 | | - ship their ideas to production faster and on a more stable foundation based |
9 | | - on the experience of <a href="https://kentcdodds.com">Kent C. Dodds</a> and |
10 | | - <a href="https://github.com/epicweb-dev/epic-stack/graphs/contributors">contributors</a>. |
11 | | - </p> |
12 | | -</div> |
| 1 | +# Epic Stack + Varlock |
13 | 2 |
|
14 | | -```sh |
15 | | -npx epicli |
16 | | -``` |
| 3 | +An example repo using [Varlock](https://varlock.dev/) within the Epic Stack to help manage configuration and secrets. |
17 | 4 |
|
18 | | -[](https://www.epicweb.dev/epic-stack) |
| 5 | +With Varlock, we convert the `.env.example` file into a `.env.schema` which contains additional schema information about all configuration in the system. This will improve developer onboarding into the epic stack, as well as ongoing DX as devs add more config into their apps. It adds additional guardrails around configuration in general, and notably adds additional protection for sensitive secrets. |
19 | 6 |
|
20 | | -[The Epic Stack](https://www.epicweb.dev/epic-stack) |
| 7 | +## Why do this? |
| 8 | +- validations, default values, and documentation are all now in one source of truth (`.env.schema`) |
| 9 | +- no more duplication between `.env.example` and `.env`, which means it will never get out of sync |
| 10 | +- only overrides must be added by user |
| 11 | +- clear env validation, decoupled from the application booting |
| 12 | +- improved TS types / IntelliSense |
| 13 | +- allows more flexible validation and composition of values based on other items |
| 14 | +- easy to now pull secrets from secure backends like 1pass, etc |
| 15 | +- leak prevention! log redaction! |
| 16 | +- clear error messages when accessing bad env vars, or using them in wrong place |
21 | 17 |
|
22 | | -<hr /> |
| 18 | +## Screenshots |
23 | 19 |
|
24 | | -## Watch Kent's Introduction to The Epic Stack |
| 20 | +Some screenshots of varlock in action: |
25 | 21 |
|
26 | | -[](https://www.epicweb.dev/talks/the-epic-stack) |
| 22 | +_`varlock load` showing loaded and validated env_<br/> |
| 23 | +<img width="488" height="393" alt="image" src="https://github.com/user-attachments/assets/9e80775e-ddf4-47b8-8ca1-0e4471c37299" /> |
| 24 | +<br/> |
27 | 25 |
|
28 | | -["The Epic Stack" by Kent C. Dodds](https://www.epicweb.dev/talks/the-epic-stack) |
| 26 | +_Improved IntelliSense_<br/> |
| 27 | +<img width="435" height="131" alt="image" src="https://github.com/user-attachments/assets/3732dc0f-79f5-4ee5-a846-d314b31db1da" /> |
| 28 | +<br/> |
29 | 29 |
|
30 | | -## Docs |
| 30 | +_Leak detection example_<br/> |
| 31 | +<img width="657" height="201" alt="image" src="https://github.com/user-attachments/assets/7598448a-d18c-47b6-b7c5-df3c68bbd875" /> |
| 32 | +<br/> |
31 | 33 |
|
32 | | -[Read the docs](https://github.com/epicweb-dev/epic-stack/blob/main/docs) |
33 | | -(please 🙏). |
| 34 | +_Log redaction example_<br/> |
| 35 | +<img width="202" height="52" alt="image" src="https://github.com/user-attachments/assets/3643b5d0-eec6-4f68-a488-0dfda7f18684" /> |
| 36 | +<br/> |
34 | 37 |
|
35 | | -## Support |
36 | | - |
37 | | -- 🆘 Join the |
38 | | - [discussion on GitHub](https://github.com/epicweb-dev/epic-stack/discussions) |
39 | | - and the [KCD Community on Discord](https://kcd.im/discord). |
40 | | -- 💡 Create an |
41 | | - [idea discussion](https://github.com/epicweb-dev/epic-stack/discussions/new?category=ideas) |
42 | | - for suggestions. |
43 | | -- 🐛 Open a [GitHub issue](https://github.com/epicweb-dev/epic-stack/issues) to |
44 | | - report a bug. |
45 | | - |
46 | | -## Branding |
47 | | - |
48 | | -Want to talk about the Epic Stack in a blog post or talk? Great! Here are some |
49 | | -assets you can use in your material: |
50 | | -[EpicWeb.dev/brand](https://epicweb.dev/brand) |
51 | | - |
52 | | -## Thanks |
53 | | - |
54 | | -You rock 🪨 |
| 38 | +_Example of failing env validation_<br/> |
| 39 | +<img width="430" height="176" alt="image" src="https://github.com/user-attachments/assets/d6258c48-43b8-4b6a-95d9-596a99f24e2b" /> |
| 40 | +<br/> |
0 commit comments