@launch77-shared/app-template-webapp 1.0.0 → 1.1.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @launch77-shared/app-template-webapp
2
+
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5a6a23f: updated the directory structure for webapps to now start with /src.
package/README.md.hbs CHANGED
@@ -40,13 +40,46 @@ This app uses the following Launch77 platform packages:
40
40
 
41
41
  ## Project Structure
42
42
 
43
+ This template follows the industry-standard `/src` directory structure for Next.js applications:
44
+
45
+ ```
46
+ src/
47
+ ├── app/ # Next.js App Router (pages, layouts, routes)
48
+ │ ├── layout.tsx # Root layout
49
+ │ ├── page.tsx # Homepage
50
+ │ ├── globals.css # Global styles
51
+ │ ├── dashboard/ # Example dashboard page
52
+ │ └── about/ # About page
53
+ ├── components/ # Shared React components
54
+ │ └── ui/ # UI component library (shadcn-compatible)
55
+ ├── lib/ # Utility functions and libraries
56
+ ├── hooks/ # Custom React hooks
57
+ └── modules/ # Plugin-installed feature modules
58
+ └── (plugin modules installed here)
59
+
60
+ public/ # Static assets
43
61
  ```
44
- app/
45
- ├── layout.tsx # Root layout
46
- ├── page.tsx # Homepage
47
- ├── dashboard/ # Example dashboard page
48
- ├── about/ # About page
49
- └── globals.css # Global styles (imports @launch77/theme)
62
+
63
+ ### Directory Conventions
64
+
65
+ - **`src/app/`** - Next.js App Router pages and layouts only. Keep routing logic here.
66
+ - **`src/components/`** - Create all shared components here. Use `@/components` to import.
67
+ - **`src/lib/`** - Utility functions, helpers, API clients. Use `@/lib` to import.
68
+ - **`src/hooks/`** - Custom React hooks. Use `@/hooks` to import.
69
+ - **`src/modules/`** - Feature modules installed by Launch77 plugins.
70
+
71
+ ### Creating Components
72
+
73
+ Place shared components in `src/components/`:
74
+
75
+ ```tsx
76
+ // src/components/Button.tsx
77
+ export function Button() {
78
+ return <button className="bg-primary">Click me</button>
79
+ }
80
+
81
+ // src/app/page.tsx
82
+ import { Button } from '@/components/Button'
50
83
  ```
51
84
 
52
85
  ## Next Steps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launch77-shared/app-template-webapp",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Launch77 webapp app template",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -0,0 +1,2 @@
1
+ # This directory contains shared React components
2
+ # Use @/components to import from here
@@ -0,0 +1,2 @@
1
+ # This directory contains custom React hooks
2
+ # Use @/hooks to import from here
@@ -0,0 +1,2 @@
1
+ # This directory contains utility functions, helpers, and libraries
2
+ # Use @/lib to import from here
@@ -1,7 +1,9 @@
1
1
  import type { Config } from 'tailwindcss'
2
2
 
3
3
  const config: Config = {
4
- content: ['./app/**/*.{js,ts,jsx,tsx,mdx}', './components/**/*.{js,ts,jsx,tsx,mdx}', './lib/**/*.{js,ts,jsx,tsx,mdx}'],
4
+ content: [
5
+ './src/**/*.{js,ts,jsx,tsx,mdx}', // All source code including /src/app, /src/components, etc.
6
+ ],
5
7
  theme: {
6
8
  extend: {
7
9
  // Add your custom theme extensions here
package/template.json ADDED
@@ -0,0 +1 @@
1
+ {}
package/tsconfig.json CHANGED
@@ -20,7 +20,7 @@
20
20
  }
21
21
  ],
22
22
  "paths": {
23
- "@/*": ["./*"]
23
+ "@/*": ["./src/*"]
24
24
  },
25
25
  "baseUrl": "."
26
26
  },
File without changes
File without changes
File without changes
File without changes
File without changes