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.
- package/LICENSE +21 -0
- package/README.md +126 -0
- package/dist/create-redmix-app.js +637 -0
- package/package.json +57 -0
- package/templates/js/.editorconfig +10 -0
- package/templates/js/.env +15 -0
- package/templates/js/.env.defaults +19 -0
- package/templates/js/.env.example +4 -0
- package/templates/js/.redwood/README.md +44 -0
- package/templates/js/.vscode/extensions.json +14 -0
- package/templates/js/.vscode/launch.json +56 -0
- package/templates/js/.vscode/settings.json +11 -0
- package/templates/js/.vscode/tasks.json +29 -0
- package/templates/js/.yarnrc.yml +15 -0
- package/templates/js/README.md +122 -0
- package/templates/js/api/db/schema.prisma +24 -0
- package/templates/js/api/jest.config.js +8 -0
- package/templates/js/api/jsconfig.json +41 -0
- package/templates/js/api/package.json +9 -0
- package/templates/js/api/src/directives/requireAuth/requireAuth.js +22 -0
- package/templates/js/api/src/directives/requireAuth/requireAuth.test.js +18 -0
- package/templates/js/api/src/directives/skipAuth/skipAuth.js +16 -0
- package/templates/js/api/src/directives/skipAuth/skipAuth.test.js +10 -0
- package/templates/js/api/src/functions/graphql.js +19 -0
- package/templates/js/api/src/graphql/.keep +0 -0
- package/templates/js/api/src/lib/auth.js +32 -0
- package/templates/js/api/src/lib/db.js +26 -0
- package/templates/js/api/src/lib/logger.js +17 -0
- package/templates/js/api/src/services/.keep +0 -0
- package/templates/js/gitignore.template +24 -0
- package/templates/js/graphql.config.js +11 -0
- package/templates/js/jest.config.js +8 -0
- package/templates/js/package.json +28 -0
- package/templates/js/prettier.config.js +18 -0
- package/templates/js/redwood.toml +21 -0
- package/templates/js/scripts/.keep +0 -0
- package/templates/js/scripts/jsconfig.json +54 -0
- package/templates/js/scripts/seed.js +27 -0
- package/templates/js/web/jest.config.js +8 -0
- package/templates/js/web/jsconfig.json +53 -0
- package/templates/js/web/package.json +25 -0
- package/templates/js/web/public/README.md +43 -0
- package/templates/js/web/public/favicon.png +0 -0
- package/templates/js/web/public/robots.txt +2 -0
- package/templates/js/web/src/App.jsx +16 -0
- package/templates/js/web/src/Routes.jsx +20 -0
- package/templates/js/web/src/components/.keep +0 -0
- package/templates/js/web/src/entry.client.jsx +35 -0
- package/templates/js/web/src/index.css +0 -0
- package/templates/js/web/src/index.html +15 -0
- package/templates/js/web/src/layouts/.keep +0 -0
- package/templates/js/web/src/pages/FatalErrorPage/FatalErrorPage.jsx +58 -0
- package/templates/js/web/src/pages/NotFoundPage/NotFoundPage.jsx +45 -0
- package/templates/js/web/vite.config.js +15 -0
- package/templates/js/yarn.lock +17991 -0
- package/templates/ts/.editorconfig +10 -0
- package/templates/ts/.env +15 -0
- package/templates/ts/.env.defaults +19 -0
- package/templates/ts/.env.example +4 -0
- package/templates/ts/.redwood/README.md +44 -0
- package/templates/ts/.vscode/extensions.json +14 -0
- package/templates/ts/.vscode/launch.json +56 -0
- package/templates/ts/.vscode/settings.json +11 -0
- package/templates/ts/.vscode/tasks.json +29 -0
- package/templates/ts/.yarnrc.yml +15 -0
- package/templates/ts/README.md +122 -0
- package/templates/ts/api/db/schema.prisma +24 -0
- package/templates/ts/api/jest.config.js +8 -0
- package/templates/ts/api/package.json +9 -0
- package/templates/ts/api/src/directives/requireAuth/requireAuth.test.ts +18 -0
- package/templates/ts/api/src/directives/requireAuth/requireAuth.ts +25 -0
- package/templates/ts/api/src/directives/skipAuth/skipAuth.test.ts +10 -0
- package/templates/ts/api/src/directives/skipAuth/skipAuth.ts +16 -0
- package/templates/ts/api/src/functions/graphql.ts +19 -0
- package/templates/ts/api/src/graphql/.keep +0 -0
- package/templates/ts/api/src/lib/auth.ts +32 -0
- package/templates/ts/api/src/lib/db.ts +26 -0
- package/templates/ts/api/src/lib/logger.ts +17 -0
- package/templates/ts/api/src/services/.keep +0 -0
- package/templates/ts/api/tsconfig.json +26 -0
- package/templates/ts/gitignore.template +24 -0
- package/templates/ts/graphql.config.js +11 -0
- package/templates/ts/jest.config.js +8 -0
- package/templates/ts/package.json +28 -0
- package/templates/ts/prettier.config.js +18 -0
- package/templates/ts/redwood.toml +21 -0
- package/templates/ts/scripts/.keep +0 -0
- package/templates/ts/scripts/seed.ts +27 -0
- package/templates/ts/scripts/tsconfig.json +29 -0
- package/templates/ts/web/jest.config.js +8 -0
- package/templates/ts/web/package.json +25 -0
- package/templates/ts/web/public/README.md +43 -0
- package/templates/ts/web/public/favicon.png +0 -0
- package/templates/ts/web/public/robots.txt +2 -0
- package/templates/ts/web/src/App.tsx +22 -0
- package/templates/ts/web/src/Routes.tsx +20 -0
- package/templates/ts/web/src/components/.keep +0 -0
- package/templates/ts/web/src/entry.client.tsx +35 -0
- package/templates/ts/web/src/index.css +0 -0
- package/templates/ts/web/src/index.html +15 -0
- package/templates/ts/web/src/layouts/.keep +0 -0
- package/templates/ts/web/src/pages/FatalErrorPage/FatalErrorPage.tsx +57 -0
- package/templates/ts/web/src/pages/NotFoundPage/NotFoundPage.tsx +44 -0
- package/templates/ts/web/tsconfig.json +44 -0
- package/templates/ts/web/vite.config.ts +16 -0
- 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
|
+
[](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)
|