Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #5

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9c90d0c
Readme Added
smdthiranjaya Mar 16, 2024
866a64d
StartupViewController done.
smdthiranjaya Mar 20, 2024
4a7163e
Clean so unused packges
smdthiranjaya Mar 20, 2024
a9def01
Clean
smdthiranjaya Mar 20, 2024
cf83917
Clean
smdthiranjaya Mar 20, 2024
57ba6db
Branch Clean
smdthiranjaya Mar 20, 2024
a93ce07
Clean initial commit.
smdthiranjaya Mar 20, 2024
48cf11b
Display add products from the database.
smdthiranjaya Mar 22, 2024
8f8c8db
ProductDetailView screen colour, size, qty display added.
smdthiranjaya Mar 22, 2024
60c3e8a
Cart-view created with cartviewmodel.
smdthiranjaya Mar 23, 2024
81e061f
Checkout Initial screen and model setup done.
smdthiranjaya Mar 23, 2024
08b7af4
Product View updated.
smdthiranjaya Mar 26, 2024
d1dced6
Checkout oder place screen done.
smdthiranjaya Mar 27, 2024
47218aa
Profile Screen and Model created.
smdthiranjaya Mar 27, 2024
d4e6171
Profile view changed with new UI.
smdthiranjaya Mar 28, 2024
0a59b64
Home screen UI updated. Special offer section added.
smdthiranjaya Mar 28, 2024
34b0a2d
Remove some debug prints.
smdthiranjaya Mar 28, 2024
fd4d554
Startup screen UI revamped.
smdthiranjaya Mar 29, 2024
557287e
Order model created. Checkout screen updated.
smdthiranjaya Mar 29, 2024
7a2cfde
Some alert boxes added.
smdthiranjaya Mar 29, 2024
460374b
UI updated in cart and login.
smdthiranjaya Mar 30, 2024
87a73db
Add separate config file for add ServerBaseUrl easy use.
smdthiranjaya Mar 30, 2024
ffda5e7
User registration bug fixed.
smdthiranjaya Mar 31, 2024
c7f5680
Restructured user model.
smdthiranjaya Mar 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Backup/File.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions Backup/ProductListView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

17 changes: 17 additions & 0 deletions ContentView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// ContentView.swift
// Vogue Vista
//
// Created by SMD Thiranjaya on BE 2567-03-14.
//

import SwiftUI

struct ContentView: View {
var body: some View {
NavigationView {
StartupPageViewController()
.navigationBarHidden(true) // Hide navigation bar if you don't want it
}
}
}
77 changes: 77 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Vogue Vista

Vogue Vista is an iOS application designed for an online clothing brand. It allows users to browse, search, and purchase clothing items directly from their iOS devices. The app utilizes Auth0 for user authentication and Supabase for backend services.

## Features

- User Authentication with Auth0
- Product Listings
- Product Detail Views
- Shopping Cart Management
- Checkout Functionality
- Responsive and Intuitive User Interface

## Installation

Before you can run the project, you need to follow these setup steps:

### Prerequisites

- Xcode 12 or later
- CocoaPods or Swift Package Manager
- An Auth0 account
- A Supabase project

### Setting Up Auth0

1. Create a new application in your Auth0 dashboard.
2. Note down your Client ID and Domain.
3. Configure callback URLs, logout URLs, and allowed web origins as per your iOS app's settings.

### Setting Up Supabase

1. Create a new project in Supabase.
2. Note down the API URL and anon key from the project settings.

### Configuring the iOS Project

1. Clone the repository:

```bash
git clone https://github.com/smdthiranjaya/Vogue-Vista.git
cd voguevista
````
If using CocoaPods, run:
```bash
pod install
````

Open the .xcworkspace file in Xcode.

2. Add your Auth0 ClientId and Domain to the Auth0.plist file.

3. Update the Supabase URL and anon key in the application's network configuration.

### Usage

To run the application, open the project in Xcode and run it on a simulator or a physical device.

- **Login/Signup:** Users can sign up or log in using the Auth0 integration.
- **Browse Products:** Users can browse the list of products available for purchase.
- **Product Details:** Users can view detailed information about a product.
- **Add to Cart:** Users can add products to their shopping cart.
- **Checkout:** Users can proceed to checkout to complete their purchase.

### Contributing

Contributions to Vogue Vista are welcome! Please read the CONTRIBUTING.md for guidelines on how to contribute to this project.

### License

This project is licensed under the MIT License - see the LICENSE file for details.

### Acknowledgments

- Auth0 for authentication services.
- Supabase for providing the backend as a service.
- All the open-source libraries and tools used in this project.
146 changes: 73 additions & 73 deletions Vogue Vista.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>top-level-items</key>
<array>
<dict>
<key>destination</key>
<dict>
<key>rebasable-url</key>
<dict>
<key>base</key>
<string>workspace</string>
<key>payload</key>
<dict>
<key>relative-path</key>
<string>Backup/File.swift</string>
</dict>
</dict>
<key>type</key>
<string>DVTDocumentLocation</string>
</dict>
<key>type</key>
<string>bookmark</string>
</dict>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Domain</key>
<string>dev-6x7bcpok.us.auth0.com</string>
<key>ClientId</key>
<string>zcXjouUDILlzIMrHOd5ehGNfjCQblQxB</string>
</dict>
<array/>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "6572141E-42B9-47CD-8DBA-8E113F134443"
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "402E4916-336B-4D0B-BE32-7E3F93596C12"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Vogue Vista/Screens/home.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "94"
endingLineNumber = "94"
landmarkName = "loadProducts()"
landmarkType = "7">
<Locations>
<Location
uuid = "402E4916-336B-4D0B-BE32-7E3F93596C12 - 45642012d17e7bd"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "closure #1 @Sendable (Swift.Optional&lt;Foundation.Data&gt;, Swift.Optional&lt;__C.NSURLResponse&gt;, Swift.Optional&lt;Swift.Error&gt;) -&gt; () in Vogue_Vista.HomeView.loadProducts() -&gt; ()"
moduleName = "Vogue Vista"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/thiranjaya/NIBM/APP/IOS%20App/Vogue%20Vista/Vogue%20Vista/Screens/home.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "94"
endingLineNumber = "94"
offsetFromSymbolStart = "872">
</Location>
<Location
uuid = "402E4916-336B-4D0B-BE32-7E3F93596C12 - 45642012d17e45e"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "closure #1 @Sendable (Swift.Optional&lt;Foundation.Data&gt;, Swift.Optional&lt;__C.NSURLResponse&gt;, Swift.Optional&lt;Swift.Error&gt;) -&gt; () in Vogue_Vista.HomeView.loadProducts() -&gt; ()"
moduleName = "Vogue Vista"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/thiranjaya/NIBM/APP/IOS%20App/Vogue%20Vista/Vogue%20Vista/Screens/home.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "95"
endingLineNumber = "95"
offsetFromSymbolStart = "416">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
8 changes: 0 additions & 8 deletions Vogue Vista/AppDelegate.swift

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"images" : [
{
"filename" : "logo.jpg",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
},
{
"filename" : "1024.png",
"idiom" : "iphone",
"scale" : "1x"
},
{
"filename" : "1024 1.png",
"idiom" : "iphone",
"scale" : "2x"
},
{
"filename" : "1024 2.png",
"idiom" : "iphone",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
23 changes: 23 additions & 0 deletions Vogue Vista/Assets.xcassets/logoPng.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "logo png.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "logo png 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "logo png 2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 0 additions & 24 deletions Vogue Vista/ContentView.swift

This file was deleted.

20 changes: 20 additions & 0 deletions Vogue Vista/Models/CartItemModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

import Foundation

struct CartItem: Codable, Identifiable {
let id: Int
let product_id: Int
let color: String
let size: String
let quantity: Int
let price: String
let name: String
let created_at: String
let cart_id: Int
let imageUrl: String

private enum CodingKeys: String, CodingKey {
case id, product_id, color, size, quantity, price, name, created_at, cart_id
case imageUrl = "imageurl"
}
}
8 changes: 8 additions & 0 deletions Vogue Vista/Models/CartModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Foundation

struct Cart: Codable {
let id: Int
let user_id: Int
let created_at: String
let items: [CartItem]
}
23 changes: 23 additions & 0 deletions Vogue Vista/Models/OrderModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Foundation

struct Order: Codable, Identifiable {
var id: Int
var userId: Int
var items: [CartItem]
var address: String
var cardNumber: String
var totalAmount: Double
var createdAt: String
var status: String

private enum CodingKeys: String, CodingKey {
case id
case userId = "userId"
case items
case address
case cardNumber = "cardNumber"
case totalAmount = "totalAmount"
case createdAt = "createdAt"
case status
}
}
8 changes: 0 additions & 8 deletions Vogue Vista/Models/Product.swift

This file was deleted.

23 changes: 23 additions & 0 deletions Vogue Vista/Models/ProductModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Foundation

struct Product: Identifiable, Decodable {
var id: Int
var name: String
var description: String
var price: String
var category: String
var color: String
var size: String
var imageUrl: String
var isSpecialOffer: Bool?
var specialOfferSince: String?
var createdAt: String?

enum CodingKeys: String, CodingKey {
case id, name, description, price, category, color, size
case imageUrl = "imageurl"
case isSpecialOffer = "is_special_offer"
case specialOfferSince = "special_offer_since"
case createdAt = "created_at"
}
}
Loading