|
| 1 | +# SwiftUI Project Generator 🚀 |
| 2 | + |
| 3 | +A Swift CLI tool that generates SwiftUI starter projects following the **C0D1NG** community guidelines. Create professional, well-structured SwiftUI projects with just one command! |
| 4 | + |
| 5 | +## ✨ Features |
| 6 | + |
| 7 | +- **Quick Project Setup**: Generate a complete SwiftUI project structure instantly |
| 8 | +- **C0D1NG Standards**: Follows the community guidelines and best practices |
| 9 | +- **Ready to Use**: Generated projects are immediately buildable in Xcode |
| 10 | +- **Clean Structure**: Organized directory layout with proper asset management |
| 11 | +- **Community Integration**: Built-in links to C0D1NG resources and community |
| 12 | + |
| 13 | +## 🛠 Installation |
| 14 | + |
| 15 | +### Using Swift Package Manager |
| 16 | + |
| 17 | +1. Clone this repository: |
| 18 | + |
| 19 | +```bash |
| 20 | +git clone https://github.com/C0D1NG/SwiftUI.git |
| 21 | +cd SwiftUI/SwiftUIProjectGenerator |
| 22 | +``` |
| 23 | + |
| 24 | +2. Build the executable: |
| 25 | + |
| 26 | +```bash |
| 27 | +swift build -c release |
| 28 | +``` |
| 29 | + |
| 30 | +3. Install globally (optional): |
| 31 | + |
| 32 | +```bash |
| 33 | +./install.sh |
| 34 | +``` |
| 35 | + |
| 36 | +Or copy manually to your PATH: |
| 37 | + |
| 38 | +```bash |
| 39 | +cp .build/release/swiftui-gen /usr/local/bin/ |
| 40 | +``` |
| 41 | + |
| 42 | +### Manual Installation |
| 43 | + |
| 44 | +You can also run the tool directly: |
| 45 | + |
| 46 | +```bash |
| 47 | +swift run swiftui-gen MyProject |
| 48 | +``` |
| 49 | + |
| 50 | +## 🚀 Usage |
| 51 | + |
| 52 | +### Basic Usage |
| 53 | + |
| 54 | +```bash |
| 55 | +# Generate a basic SwiftUI project |
| 56 | +swiftui-gen MyAwesomeApp |
| 57 | + |
| 58 | +# Get help |
| 59 | +swiftui-gen --help |
| 60 | +``` |
| 61 | + |
| 62 | +### Command Line Options |
| 63 | + |
| 64 | +``` |
| 65 | +USAGE: |
| 66 | + swiftui-gen <project-name> |
| 67 | +
|
| 68 | +ARGUMENTS: |
| 69 | + <project-name> The name of your SwiftUI project |
| 70 | +
|
| 71 | +OPTIONS: |
| 72 | + -h, --help Show this help message |
| 73 | +
|
| 74 | +EXAMPLES: |
| 75 | + swiftui-gen MyAwesomeApp |
| 76 | + swiftui-gen Calculator |
| 77 | + swiftui-gen WeatherApp |
| 78 | +``` |
| 79 | + |
| 80 | +## 📁 Generated Project Structure |
| 81 | + |
| 82 | +Each generated project follows this organized structure: |
| 83 | + |
| 84 | +``` |
| 85 | +YourProjectName/ |
| 86 | +├── YourProjectName.xcodeproj # Xcode project file |
| 87 | +├── YourProjectName/ # Source code |
| 88 | +│ ├── App/ # App entry point |
| 89 | +│ │ ├── YourProjectNameApp.swift |
| 90 | +│ │ └── ContentView.swift |
| 91 | +│ └── Resources/ # Assets and resources |
| 92 | +│ └── Assets.xcassets/ |
| 93 | +│ ├── Contents.json |
| 94 | +│ └── AppIcon.appiconset/ |
| 95 | +└── README.md # Project documentation |
| 96 | +``` |
| 97 | + |
| 98 | +## 🎨 What You Get |
| 99 | + |
| 100 | +### Ready-to-Run SwiftUI App |
| 101 | + |
| 102 | +- Complete app structure with `@main` entry point |
| 103 | +- Welcome screen with Swift logo and branding |
| 104 | +- Proper SwiftUI architecture setup |
| 105 | +- Asset catalog with app icon placeholder |
| 106 | + |
| 107 | +### Professional Documentation |
| 108 | + |
| 109 | +- Comprehensive README with setup instructions |
| 110 | +- Links to C0D1NG community resources |
| 111 | +- Clear next steps for development |
| 112 | +- Community guidelines and standards |
| 113 | + |
| 114 | +### Development Ready |
| 115 | + |
| 116 | +- Immediate buildable state in Xcode |
| 117 | +- Proper iOS app configuration |
| 118 | +- Asset management setup |
| 119 | +- Follow iOS development best practices |
| 120 | + |
| 121 | +## 🎯 Example Generation |
| 122 | + |
| 123 | +```bash |
| 124 | +$ swiftui-gen Calculator |
| 125 | +🚀 Creating SwiftUI project: Calculator |
| 126 | +✅ Project created successfully! |
| 127 | +📁 Location: /Users/yourname/Calculator |
| 128 | +🚀 Next steps: |
| 129 | + 1. cd Calculator |
| 130 | + 2. open Calculator.xcodeproj |
| 131 | + 3. Build and run your project! |
| 132 | +``` |
| 133 | + |
| 134 | +Generated `ContentView.swift`: |
| 135 | + |
| 136 | +```swift |
| 137 | +import SwiftUI |
| 138 | + |
| 139 | +struct ContentView: View { |
| 140 | + var body: some View { |
| 141 | + VStack { |
| 142 | + Image(systemName: "swift") |
| 143 | + .font(.system(size: 80)) |
| 144 | + .foregroundColor(.blue) |
| 145 | + |
| 146 | + Text("Welcome to SwiftUI!") |
| 147 | + .font(.largeTitle) |
| 148 | + .fontWeight(.bold) |
| 149 | + |
| 150 | + Text("Your Calculator app is ready!") |
| 151 | + .font(.body) |
| 152 | + .padding() |
| 153 | + } |
| 154 | + .padding() |
| 155 | + } |
| 156 | +} |
| 157 | + |
| 158 | +#Preview { |
| 159 | + ContentView() |
| 160 | +} |
| 161 | +``` |
| 162 | + |
| 163 | +## � Quick Start Workflow |
| 164 | + |
| 165 | +1. **Generate your project:** |
| 166 | + |
| 167 | + ```bash |
| 168 | + swiftui-gen MyAwesomeApp |
| 169 | + ``` |
| 170 | + |
| 171 | +2. **Open in Xcode:** |
| 172 | + |
| 173 | + ```bash |
| 174 | + cd MyAwesomeApp |
| 175 | + open MyAwesomeApp.xcodeproj |
| 176 | + ``` |
| 177 | + |
| 178 | +3. **Build and run** (⌘+R) |
| 179 | + |
| 180 | +4. **Start coding** your SwiftUI masterpiece! |
| 181 | + |
| 182 | +## 🤝 Contributing to the Generator |
| 183 | + |
| 184 | +We welcome contributions to improve the SwiftUI Project Generator! |
| 185 | + |
| 186 | +### Development Setup |
| 187 | + |
| 188 | +1. Fork and clone the repository |
| 189 | +2. Make your changes to the generator |
| 190 | +3. Test with different project names: |
| 191 | + |
| 192 | +```bash |
| 193 | +swift run swiftui-gen TestProject1 |
| 194 | +swift run swiftui-gen TestProject2 |
| 195 | +``` |
| 196 | + |
| 197 | +4. Submit a pull request |
| 198 | + |
| 199 | +### Future Enhancements |
| 200 | + |
| 201 | +This is a simplified version. Planned improvements include: |
| 202 | + |
| 203 | +- Multiple project templates (Calculator, Todo, Weather, etc.) |
| 204 | +- Difficulty levels (Beginner, Intermediate, Advanced) |
| 205 | +- Custom iOS version targeting |
| 206 | +- Unit test generation |
| 207 | +- Advanced project structures |
| 208 | +- Additional SwiftUI patterns and examples |
| 209 | + |
| 210 | +## 📄 License |
| 211 | + |
| 212 | +This project is part of the **C0D1NG** open source initiative and is available under the MIT License. |
| 213 | + |
| 214 | +## 🔗 Connect |
| 215 | + |
| 216 | +- **Community**: [Telegram](https://t.me/C0D1NG) |
| 217 | +- **Organization**: [C0D1NG on GitHub](https://github.com/C0D1NG) |
| 218 | +- **Website**: [c0d1ng.github.io](https://c0d1ng.github.io/) |
| 219 | +- **SwiftUI Projects**: [SwiftUI Repository](https://github.com/C0D1NG/SwiftUI) |
| 220 | + |
| 221 | +--- |
| 222 | + |
| 223 | +<div align="center"> |
| 224 | + |
| 225 | +**Made with ❤️ and Swift** |
| 226 | + |
| 227 | +⭐ **Star this repository if it helped you create amazing SwiftUI projects!** |
| 228 | + |
| 229 | +**Part of the [C0D1NG](https://github.com/C0D1NG) open source community** |
| 230 | + |
| 231 | +</div> |
0 commit comments