create-redmix-app 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +126 -0
  3. package/dist/create-redmix-app.js +637 -0
  4. package/package.json +57 -0
  5. package/templates/js/.editorconfig +10 -0
  6. package/templates/js/.env +15 -0
  7. package/templates/js/.env.defaults +19 -0
  8. package/templates/js/.env.example +4 -0
  9. package/templates/js/.redwood/README.md +44 -0
  10. package/templates/js/.vscode/extensions.json +14 -0
  11. package/templates/js/.vscode/launch.json +56 -0
  12. package/templates/js/.vscode/settings.json +11 -0
  13. package/templates/js/.vscode/tasks.json +29 -0
  14. package/templates/js/.yarnrc.yml +15 -0
  15. package/templates/js/README.md +122 -0
  16. package/templates/js/api/db/schema.prisma +24 -0
  17. package/templates/js/api/jest.config.js +8 -0
  18. package/templates/js/api/jsconfig.json +41 -0
  19. package/templates/js/api/package.json +9 -0
  20. package/templates/js/api/src/directives/requireAuth/requireAuth.js +22 -0
  21. package/templates/js/api/src/directives/requireAuth/requireAuth.test.js +18 -0
  22. package/templates/js/api/src/directives/skipAuth/skipAuth.js +16 -0
  23. package/templates/js/api/src/directives/skipAuth/skipAuth.test.js +10 -0
  24. package/templates/js/api/src/functions/graphql.js +19 -0
  25. package/templates/js/api/src/graphql/.keep +0 -0
  26. package/templates/js/api/src/lib/auth.js +32 -0
  27. package/templates/js/api/src/lib/db.js +26 -0
  28. package/templates/js/api/src/lib/logger.js +17 -0
  29. package/templates/js/api/src/services/.keep +0 -0
  30. package/templates/js/gitignore.template +24 -0
  31. package/templates/js/graphql.config.js +11 -0
  32. package/templates/js/jest.config.js +8 -0
  33. package/templates/js/package.json +28 -0
  34. package/templates/js/prettier.config.js +18 -0
  35. package/templates/js/redwood.toml +21 -0
  36. package/templates/js/scripts/.keep +0 -0
  37. package/templates/js/scripts/jsconfig.json +54 -0
  38. package/templates/js/scripts/seed.js +27 -0
  39. package/templates/js/web/jest.config.js +8 -0
  40. package/templates/js/web/jsconfig.json +53 -0
  41. package/templates/js/web/package.json +25 -0
  42. package/templates/js/web/public/README.md +43 -0
  43. package/templates/js/web/public/favicon.png +0 -0
  44. package/templates/js/web/public/robots.txt +2 -0
  45. package/templates/js/web/src/App.jsx +16 -0
  46. package/templates/js/web/src/Routes.jsx +20 -0
  47. package/templates/js/web/src/components/.keep +0 -0
  48. package/templates/js/web/src/entry.client.jsx +35 -0
  49. package/templates/js/web/src/index.css +0 -0
  50. package/templates/js/web/src/index.html +15 -0
  51. package/templates/js/web/src/layouts/.keep +0 -0
  52. package/templates/js/web/src/pages/FatalErrorPage/FatalErrorPage.jsx +58 -0
  53. package/templates/js/web/src/pages/NotFoundPage/NotFoundPage.jsx +45 -0
  54. package/templates/js/web/vite.config.js +15 -0
  55. package/templates/js/yarn.lock +17991 -0
  56. package/templates/ts/.editorconfig +10 -0
  57. package/templates/ts/.env +15 -0
  58. package/templates/ts/.env.defaults +19 -0
  59. package/templates/ts/.env.example +4 -0
  60. package/templates/ts/.redwood/README.md +44 -0
  61. package/templates/ts/.vscode/extensions.json +14 -0
  62. package/templates/ts/.vscode/launch.json +56 -0
  63. package/templates/ts/.vscode/settings.json +11 -0
  64. package/templates/ts/.vscode/tasks.json +29 -0
  65. package/templates/ts/.yarnrc.yml +15 -0
  66. package/templates/ts/README.md +122 -0
  67. package/templates/ts/api/db/schema.prisma +24 -0
  68. package/templates/ts/api/jest.config.js +8 -0
  69. package/templates/ts/api/package.json +9 -0
  70. package/templates/ts/api/src/directives/requireAuth/requireAuth.test.ts +18 -0
  71. package/templates/ts/api/src/directives/requireAuth/requireAuth.ts +25 -0
  72. package/templates/ts/api/src/directives/skipAuth/skipAuth.test.ts +10 -0
  73. package/templates/ts/api/src/directives/skipAuth/skipAuth.ts +16 -0
  74. package/templates/ts/api/src/functions/graphql.ts +19 -0
  75. package/templates/ts/api/src/graphql/.keep +0 -0
  76. package/templates/ts/api/src/lib/auth.ts +32 -0
  77. package/templates/ts/api/src/lib/db.ts +26 -0
  78. package/templates/ts/api/src/lib/logger.ts +17 -0
  79. package/templates/ts/api/src/services/.keep +0 -0
  80. package/templates/ts/api/tsconfig.json +26 -0
  81. package/templates/ts/gitignore.template +24 -0
  82. package/templates/ts/graphql.config.js +11 -0
  83. package/templates/ts/jest.config.js +8 -0
  84. package/templates/ts/package.json +28 -0
  85. package/templates/ts/prettier.config.js +18 -0
  86. package/templates/ts/redwood.toml +21 -0
  87. package/templates/ts/scripts/.keep +0 -0
  88. package/templates/ts/scripts/seed.ts +27 -0
  89. package/templates/ts/scripts/tsconfig.json +29 -0
  90. package/templates/ts/web/jest.config.js +8 -0
  91. package/templates/ts/web/package.json +25 -0
  92. package/templates/ts/web/public/README.md +43 -0
  93. package/templates/ts/web/public/favicon.png +0 -0
  94. package/templates/ts/web/public/robots.txt +2 -0
  95. package/templates/ts/web/src/App.tsx +22 -0
  96. package/templates/ts/web/src/Routes.tsx +20 -0
  97. package/templates/ts/web/src/components/.keep +0 -0
  98. package/templates/ts/web/src/entry.client.tsx +35 -0
  99. package/templates/ts/web/src/index.css +0 -0
  100. package/templates/ts/web/src/index.html +15 -0
  101. package/templates/ts/web/src/layouts/.keep +0 -0
  102. package/templates/ts/web/src/pages/FatalErrorPage/FatalErrorPage.tsx +57 -0
  103. package/templates/ts/web/src/pages/NotFoundPage/NotFoundPage.tsx +44 -0
  104. package/templates/ts/web/tsconfig.json +44 -0
  105. package/templates/ts/web/vite.config.ts +16 -0
  106. package/templates/ts/yarn.lock +17991 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Redmix
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,126 @@
1
+ [![RedwoodJS](https://raw.githubusercontent.com/redwoodjs/redwoodjs.com/main/publish/images/mark-logo-cover.png)](https://redwoodjs.com)
2
+
3
+ <!-- prettier-ignore-start -->
4
+ <p align="center">
5
+ <a aria-label="Start the Tutorial" href="https://redwoodjs.com/docs/tutorial">
6
+ <img alt="" src="https://img.shields.io/badge/Start%20the%20Tutorial-%23BF4722?style=for-the-badge&labelColor=000000&logoWidth=20&logo=RedwoodJS">
7
+ </a>
8
+ <a aria-label="Join the Forums" href="https://community.redwoodjs.com">
9
+ <img alt="" src="https://img.shields.io/badge/Join%20the%20Forums-%23FFF9AE?style=for-the-badge&labelColor=000000&logoWidth=20&logo=Discourse">
10
+ </a>
11
+ <a aria-label="Join the Chat" href="https://discord.gg/redwoodjs">
12
+ <img alt="" src="https://img.shields.io/badge/Join%20the%20Chat-%237289DA?style=for-the-badge&labelColor=000000&logoWidth=20&logo=Discord&logoColor=white">
13
+ </a>
14
+ </p>
15
+ <!-- prettier-ignore-end -->
16
+ <br>
17
+ <h1 align="center">The App Framework for Startups</h1>
18
+
19
+ <h2 align="center">Ship today with architecture for tomorrow.</h2>
20
+
21
+ Redwood is an opinionated framework for modern multi-client applications, built on React, GraphQL, and Prisma with full TypeScript support and ready to go with zero config.
22
+
23
+ Want great developer experience and easy scaling? How about an integrated front- and back-end test suite, boilerplate code generators, component design, logging, API security + auth, and serverless or traditional deploy support? Redwood is here! Redwood works with the components and development workflow you love but with simple conventions and helpers to make your experience even better.
24
+
25
+ <h2>Quick Start</h2>
26
+
27
+ Redwood requires Node.js =20.x.
28
+
29
+ ```bash
30
+ yarn create redwood-app my-redwood-app
31
+ cd my-redwood-app
32
+ yarn install
33
+ yarn redwood dev
34
+ ```
35
+
36
+ <h3>Resources</h3>
37
+
38
+ - The [Redwood Tutorial](https://redwoodjs.com/docs/tutorial): the best way to learn Redwood
39
+ - The [Redwood CLI](https://redwoodjs.com/docs/cli-commands): code generators, DB helpers, setup commands, and more
40
+ - [Documentation](https://redwoodjs.com/docs) and [How To's](https://redwoodjs.com/how-to/custom-function)
41
+ - Join the Community [Forums](https://community.redwoodjs.com) and [Chat](https://discord.gg/redwoodjs)
42
+
43
+ <h2>Contributing to create-redmix-app</h2>
44
+
45
+ _Contributors are Welcome! Get started [here](https://redwoodjs.com/docs/contributing). And don't hesitate to ask for help on the forums and chat_.
46
+
47
+ **Table of Contents**
48
+
49
+ <!-- toc -->
50
+
51
+ - [Description](#description)
52
+ - [Local Development](#local-development)
53
+ - [Installation Script](#installation-script)
54
+ - [Template Codebase](#template-codebase)
55
+ - [How to run create-redmix-app and create a project](#how-to-run-create-redmix-app-and-create-a-project)
56
+ - [Develop using the new project](#develop-using-the-new-project)
57
+
58
+ ## Description
59
+
60
+ This package creates and installs a Redwood project, which is the entry point for anyone using Redwood. It has two parts:
61
+
62
+ - The installation script [`src/create-redmix-app.js`](./src/create-redmix-app.js)
63
+ - Project template code in the [`templates/`](./templates/) directory
64
+
65
+ ## Local Development
66
+
67
+ ### Installation Script
68
+
69
+ The installation script is built with [Yargs](https://github.com/yargs/yargs).
70
+
71
+ ### Template Codebase
72
+
73
+ The project codebase in [`templates/`](./templates/) uses [Yarn Workspaces](https://yarnpkg.com/features/workspaces) for a monorepo project containing the API and Web Sides. Redwood packages are included in `templates/ts/package.json`, `templates/ts/web/package.json`, and `templates/ts/api/package.json`, respectively.
74
+
75
+ ### How to run `create-redmix-app` from your local repo and create a project
76
+
77
+ First, run the following commands in the root of the monorepo:
78
+
79
+ ```bash
80
+ yarn install
81
+ yarn build
82
+ ```
83
+
84
+ Then, navigate to the create redwood app package:
85
+
86
+ ```bash
87
+ cd packages/create-redmix-app
88
+ ```
89
+
90
+ Run `yarn node` on the built file (`dist/create-redmix-app.js`) and pass in the path to the new project:
91
+
92
+ ```bash
93
+ yarn node ./dist/create-redmix-app.js /path/to/new/redwood-app
94
+ ```
95
+
96
+ > [!NOTE]
97
+ > the new project will install with the most recent major Redwood package version by default.
98
+
99
+ ### How to run other published versions for debugging
100
+
101
+ By default yarn create will pick the latest stable version to run, but you can specify a different version via yarn too!
102
+
103
+ To try the canary version, run:
104
+
105
+ ```
106
+ npx create-redmix-app@canary /path/to/project
107
+ ```
108
+
109
+ Note that this will still create a project with the latest stable version, but run the canary version of create-redmix-app, and is mainly useful for debugging this package, and not the redwood canary release.
110
+
111
+ You can specify any tag or version instead of `@canary`
112
+
113
+ ### Develop using the new project
114
+
115
+ There are three options for developing with the installed project:
116
+
117
+ **1. Upgrade the project to use the latest canary release**
118
+
119
+ ```bash
120
+ cd /path/to/new/redwood-app
121
+ yarn rw upgrade -t canary
122
+ ```
123
+
124
+ **2. Use the workflow and tools for local package development**
125
+
126
+ - [Local Development Instructions](https://github.com/redwoodjs/redwood/blob/main/CONTRIBUTING.md)