Skip to content

phuongdoanduy/devday-aavn-ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DevdayAAVN - NFT Marketplace iOS App

A modern iOS 18+ application built with Swift 6.1 and SwiftUI, featuring a glass morphism design system and Figma-to-code integration via Model Context Protocol (MCP).

πŸ“š Documentation

This project includes comprehensive documentation for AI-assisted development:

Core Documentation

Key Features

  • βœ… Figma MCP Integration - Automated design-to-code workflow
  • βœ… Type-Safe Design Tokens - Centralized design system in DesignSystem.swift
  • βœ… Glass Morphism UI - Native SwiftUI material effects
  • βœ… Component-Based Architecture - Reusable, composable UI components
  • βœ… Swift 6 Concurrency - Modern async/await patterns with strict concurrency checking

Customization Options

These rules files are starting points - feel free to:

  • βœ… Edit them to match your team's coding standards
  • βœ… Delete them if you prefer different approaches
  • βœ… Add your own rules for other AI tools
  • βœ… Update them as new iOS APIs become available

What Makes These Rules Opinionated

  • No ViewModels: Embraces pure SwiftUI state management patterns
  • Swift 6+ Concurrency: Enforces modern async/await over legacy patterns
  • Latest APIs: Recommends iOS 18+ features with optional iOS 26 guidelines
  • Testing First: Promotes Swift Testing framework over XCTest
  • Performance Focus: Emphasizes @Observable over @Published for better performance

Note for AI assistants: You MUST read the relevant rules files before making changes to ensure consistency with project standards.

Project Architecture

DevdayAAVN/
β”œβ”€β”€ DevdayAAVN.xcworkspace/              # Open this file in Xcode
β”œβ”€β”€ DevdayAAVN.xcodeproj/                # Xcode project
β”œβ”€β”€ Config/                              # Build configuration
β”‚   β”œβ”€β”€ Shared.xcconfig                 # Common settings
β”‚   β”œβ”€β”€ Debug.xcconfig                  # Debug configuration
β”‚   β”œβ”€β”€ Release.xcconfig                # Release configuration
β”‚   └── DevdayAAVN.entitlements         # App capabilities
β”œβ”€β”€ DevdayAAVN/                          # Main app target
β”‚   β”œβ”€β”€ DevdayAAVNApp.swift             # App entry point
β”‚   β”œβ”€β”€ ContentView.swift               # Main screen
β”‚   β”œβ”€β”€ UIComponent/                    # πŸš€ UI Components
β”‚   β”‚   β”œβ”€β”€ DesignSystem.swift          # Design tokens
β”‚   β”‚   β”œβ”€β”€ Hero/                       # Hero section
β”‚   β”‚   β”œβ”€β”€ Search/                     # Search components
β”‚   β”‚   β”œβ”€β”€ Cart/                       # Cart components
β”‚   β”‚   β”œβ”€β”€ NavigationBar/              # Navigation
β”‚   β”‚   └── NFTCard/                    # NFT card components
β”‚   β”œβ”€β”€ Models/                         # Data models
β”‚   β”‚   └── NFTFeatured.swift
β”‚   └── Resources/                      # Assets & fonts
β”‚       β”œβ”€β”€ Assets.xcassets/            # Images & icons
β”‚       └── Fonts/                      # Custom fonts (Orbitron)
└── Documentation/
    β”œβ”€β”€ CLAUDE.md                       # Architecture guide
    β”œβ”€β”€ FIGMA_DESIGN_SYSTEM.md          # Figma integration
    └── DESIGN_SYSTEM_QUICK_REFERENCE.md

Key Architecture Points

SwiftUI-First Design

  • No ViewModels: Pure SwiftUI state management with @State and @Observable
  • Component Composition: Complex UIs built from smaller, reusable components
  • Design Tokens: Centralized design system for consistency
  • MCP Integration: Figma designs converted to SwiftUI via Model Context Protocol

Design System Structure

  • DesignSystem.swift: Type-safe tokens for spacing, colors, typography, etc.
  • Component Folders: Each major UI section in its own folder with subcomponents
  • Glass Morphism: Native .ultraThinMaterial effects throughout
  • Responsive Layouts: GeometryReader for adaptive sizing

Building & Running

Using Makefile (Recommended)

The project includes a comprehensive Makefile for all build operations:

# Show all available commands
make help

# Build the project
make build              # Build in Debug mode
make build-release      # Build in Release mode
make compile            # Quick compile check

# Run tests
make test               # Run all tests
make test-unit          # Run unit tests only
make test-ui            # Run UI tests only

# Clean & maintenance
make clean              # Clean build artifacts
make clean-deep         # Deep clean including derived data
make reset              # Reset package dependencies

# Project information
make info               # Show project details
make schemes            # List available schemes
make devices            # List available simulators

Using Xcode

  1. Open DevdayAAVN.xcodeproj in Xcode
  2. Select the DevdayAAVN scheme
  3. Choose a simulator or device
  4. Press ⌘+B to build or ⌘+R to run

Figma Design Integration

This project uses Figma MCP (Model Context Protocol) for seamless design-to-code conversion.

Quick Workflow

  1. Analyze Figma Design

    mcp__figma-dev-mode-mcp-server__get_screenshot()
    mcp__figma-dev-mode-mcp-server__get_metadata({ nodeId: "..." })
    mcp__figma-dev-mode-mcp-server__get_variable_defs()
  2. Convert to SwiftUI

    • Extract design tokens β†’ Add to DesignSystem.swift
    • Convert React/Tailwind β†’ SwiftUI components
    • Download images β†’ Add to Assets.xcassets
  3. Build Component

    • Create data model in Models/
    • Build view in UIComponent/ComponentName/
    • Add SwiftUI preview
    • Verify with make build-debug

πŸ“– See FIGMA_DESIGN_SYSTEM.md for complete guide

Development Notes

Code Organization

Components are organized by feature in DevdayAAVN/UIComponent/, with each major feature having its own folder containing related subcomponents.

Public API Requirements

Types exposed to the app target need public access:

public struct NewView: View {
    public init() {}
    
    public var body: some View {
        // Your view code
    }
}

Adding Dependencies

Edit UIComponent/Package.swift to add SPM dependencies:

dependencies: [
    .package(url: "https://github.com/example/SomePackage", from: "1.0.0")
],
targets: [
    .target(
        name: "UIComponent",
        dependencies: ["SomePackage"]
    ),
]

Test Structure

  • Unit Tests: UIComponent/Tests/UIComponentTests/ (Swift Testing framework)
  • UI Tests: DevdayAAVNUITests/ (XCUITest framework)
  • Test Plan: DevdayAAVN.xctestplan coordinates all tests

Configuration

XCConfig Build Settings

Build settings are managed through XCConfig files in Config/:

  • Config/Shared.xcconfig - Common settings (bundle ID, versions, deployment target)
  • Config/Debug.xcconfig - Debug-specific settings
  • Config/Release.xcconfig - Release-specific settings
  • Config/Tests.xcconfig - Test-specific settings

Entitlements Management

App capabilities are managed through a declarative entitlements file:

  • Config/DevdayAAVN.entitlements - All app entitlements and capabilities
  • AI agents can safely edit this XML file to add HealthKit, CloudKit, Push Notifications, etc.
  • No need to modify complex Xcode project files

Asset Management

  • App-Level Assets: DevdayAAVN/Assets.xcassets/ (app icon, accent color)
  • Feature Assets: Add Resources/ folder to SPM package if needed

SPM Package Resources

To include assets in your feature package:

.target(
    name: "UIComponent",
    dependencies: [],
    resources: [.process("Resources")]
)

Generated with XcodeBuildMCP

This project was scaffolded using XcodeBuildMCP, which provides tools for AI-assisted iOS development workflows.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors