├── welink_backend ├── api │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0003_remove_user_image_url.py │ │ ├── 0008_remove_linkstyle_shadows.py │ │ ├── 0013_alter_link_href.py │ │ ├── 0014_link_visible.py │ │ ├── 0012_alter_link_icon.py │ │ ├── 0010_linkstyle_issoftshadow.py │ │ ├── 0009_linkprofile_radius.py │ │ ├── 0004_rename_display_name_linkprofile_profile_title.py │ │ ├── 0011_alter_linkprofile_color_hex.py │ │ ├── 0007_alter_linkstyle_ishardshadow.py │ │ ├── 0005_alter_linkprofile_avatar_and_more.py │ │ ├── 0002_linkprofile_link.py │ │ ├── 0006_linkstyle_linkprofile_color_hex_and_more.py │ │ └── 0001_initial.py │ ├── tests.py │ ├── apps.py │ ├── admin.py │ ├── urls.py │ ├── models.py │ ├── serializers.py │ └── views.py ├── welink_backend │ ├── __init__.py │ ├── urls.py │ ├── asgi.py │ ├── wsgi.py │ └── settings.py ├── .gitignore ├── db.sqlite3 ├── package.json ├── pnpm-lock.yaml └── manage.py ├── linux ├── .gitignore ├── main.cc ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt ├── my_application.h ├── my_application.cc └── CMakeLists.txt ├── ios ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── .gitignore ├── Podfile.lock └── Podfile ├── welink_web ├── .eslintrc.json ├── public │ ├── logo.png │ ├── favicon.ico │ ├── vercel.svg │ ├── thirteen.svg │ └── next.svg ├── jsconfig.json ├── next.config.js ├── src │ ├── pages │ │ ├── _app.js │ │ ├── api │ │ │ └── hello.js │ │ ├── _document.js │ │ ├── index.js │ │ └── [username] │ │ │ └── index.jsx │ ├── styles │ │ ├── globals.css │ │ └── Home.module.scss │ └── components │ │ └── Link.jsx ├── .gitignore ├── package.json └── README.md ├── lib ├── res │ ├── ui.dart │ ├── constants.dart │ └── colors.dart ├── models │ ├── others │ │ ├── response.dart │ │ └── user.dart │ └── links │ │ ├── style.dart │ │ ├── link.dart │ │ └── link_profile.dart ├── views │ ├── app │ │ ├── edit │ │ │ └── screens │ │ │ │ └── add_link_screen.dart │ │ ├── links │ │ │ └── link_list.dart │ │ ├── home.dart │ │ └── home │ │ │ └── widgets │ │ │ └── link.dart │ ├── components │ │ └── textfield.dart │ └── auth │ │ ├── login_screen.dart │ │ └── create_account_screen.dart ├── main.dart ├── providers │ ├── auth_provider.dart │ └── links_provider.dart └── services │ └── network_service.dart ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── manifest.json └── index.html ├── assets ├── login_image.png ├── signup_image.png ├── Screenshot 2023-02-26 at 01.17.54.png └── Screenshot 2023-02-26 at 12.32.50.png ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── we_link_app │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── macos ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ ├── app_icon_64.png │ │ │ ├── app_icon_1024.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ ├── MainFlutterWindow.swift │ └── Info.plist ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme └── Podfile ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ ├── main.cpp │ ├── CMakeLists.txt │ ├── utils.cpp │ ├── flutter_window.cpp │ ├── Runner.rc │ ├── win32_window.h │ └── win32_window.cpp ├── .gitignore ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt └── CMakeLists.txt ├── .vscode └── launch.json ├── .gitignore ├── README.md ├── analysis_options.yaml ├── .metadata └── pubspec.yaml /welink_backend/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /welink_backend/welink_backend/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /welink_backend/.gitignore: -------------------------------------------------------------------------------- 1 | /media/ 2 | /db.sqlite3 3 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /welink_web/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /lib/res/ui.dart: -------------------------------------------------------------------------------- 1 | class AppUi { 2 | static double scaffoldPadding = 15; 3 | } 4 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/web/favicon.png -------------------------------------------------------------------------------- /assets/login_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/assets/login_image.png -------------------------------------------------------------------------------- /assets/signup_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/assets/signup_image.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /welink_backend/api/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /welink_backend/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/welink_backend/db.sqlite3 -------------------------------------------------------------------------------- /welink_backend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "react-icons": "^4.7.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /welink_web/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/welink_web/public/logo.png -------------------------------------------------------------------------------- /lib/res/constants.dart: -------------------------------------------------------------------------------- 1 | class AppConstants { 2 | static const host = "http://127.0.0.1:8000"; 3 | } 4 | -------------------------------------------------------------------------------- /welink_web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/welink_web/public/favicon.ico -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /assets/Screenshot 2023-02-26 at 01.17.54.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/assets/Screenshot 2023-02-26 at 01.17.54.png -------------------------------------------------------------------------------- /assets/Screenshot 2023-02-26 at 12.32.50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/assets/Screenshot 2023-02-26 at 12.32.50.png -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /welink_web/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "@/*": ["./src/*"] 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /welink_web/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | reactStrictMode: true, 4 | } 5 | 6 | module.exports = nextConfig 7 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /welink_web/src/pages/_app.js: -------------------------------------------------------------------------------- 1 | import '@/styles/globals.css' 2 | 3 | export default function App({ Component, pageProps }) { 4 | return 5 | } 6 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /welink_backend/api/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ApiConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'api' 7 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hemsara/welink/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /lib/res/colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AppColors { 4 | static Color scaffoldColor = Color.fromARGB(255, 249, 251, 253); 5 | static Color blueColor = Color(0xff07ADF3); 6 | } 7 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/we_link_app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.we_link_app 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /welink_web/src/pages/api/hello.js: -------------------------------------------------------------------------------- 1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction 2 | 3 | export default function handler(req, res) { 4 | res.status(200).json({ name: 'John Doe' }) 5 | } 6 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /welink_web/src/styles/globals.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500&display=swap"); 2 | 3 | * { 4 | margin: 0; 5 | padding: 0; 6 | box-sizing: border-box; 7 | font-family: "Poppins", sans-serif; 8 | } 9 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 6 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /welink_backend/api/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import User, Link, LinkProfile, LinkStyle 3 | # Register your models here. 4 | 5 | admin.site.register(User) 6 | admin.site.register(LinkProfile) 7 | admin.site.register(LinkStyle) 8 | admin.site.register(Link) 9 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [] 7 | } -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/models/others/response.dart: -------------------------------------------------------------------------------- 1 | enum ResponseStatus { success, failed } 2 | 3 | class Response { 4 | final ResponseStatus status; 5 | final Map? data; 6 | final List? errors; 7 | Response({ 8 | required this.status, 9 | this.data, 10 | this.errors, 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /welink_web/src/pages/_document.js: -------------------------------------------------------------------------------- 1 | import { Html, Head, Main, NextScript } from 'next/document' 2 | 3 | export default function Document() { 4 | return ( 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/views/app/edit/screens/add_link_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/src/widgets/container.dart'; 2 | import 'package:flutter/src/widgets/framework.dart'; 3 | 4 | class AddLink extends StatelessWidget { 5 | const AddLink({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Container(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import flutter_secure_storage_macos 9 | 10 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 11 | FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) 12 | } 13 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /welink_backend/pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: 5.4 2 | 3 | specifiers: 4 | react-icons: ^4.7.1 5 | 6 | dependencies: 7 | react-icons: 4.7.1 8 | 9 | packages: 10 | 11 | /react-icons/4.7.1: 12 | resolution: {integrity: sha512-yHd3oKGMgm7zxo3EA7H2n7vxSoiGmHk5t6Ou4bXsfcgWyhfDKMpyKfhHR6Bjnn63c+YXBLBPUql9H4wPJM6sXw==} 13 | peerDependencies: 14 | react: '*' 15 | dev: false 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0003_remove_user_image_url.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-20 06:10 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0002_linkprofile_link'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='user', 15 | name='image_url', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /welink_backend/welink_backend/urls.py: -------------------------------------------------------------------------------- 1 | 2 | from django.contrib import admin 3 | from django.urls import path, include 4 | from django.conf.urls.static import static 5 | from django.conf import settings 6 | 7 | urlpatterns = [ 8 | path('admin/', admin.site.urls), 9 | path('api/', include('api.urls')), 10 | 11 | ] 12 | if settings.DEBUG: 13 | urlpatterns += static(settings.MEDIA_URL, 14 | document_root=settings.MEDIA_ROOT) 15 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0008_remove_linkstyle_shadows.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-25 08:27 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0007_alter_linkstyle_ishardshadow'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='linkstyle', 15 | name='shadows', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void RegisterPlugins(flutter::PluginRegistry* registry) { 12 | FlutterSecureStorageWindowsPluginRegisterWithRegistrar( 13 | registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); 14 | } 15 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0013_alter_link_href.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-26 19:30 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0012_alter_link_icon'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='link', 15 | name='href', 16 | field=models.CharField(max_length=2550), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0014_link_visible.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-26 19:40 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0013_alter_link_href'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='link', 15 | name='visible', 16 | field=models.BooleanField(default=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /welink_backend/welink_backend/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for welink_backend project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'welink_backend.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /welink_backend/welink_backend/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for welink_backend project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'welink_backend.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /welink_web/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | .pnpm-debug.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0012_alter_link_icon.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-26 19:04 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0011_alter_linkprofile_color_hex'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='link', 15 | name='icon', 16 | field=models.CharField(max_length=2550), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0010_linkstyle_issoftshadow.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-25 10:12 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0009_linkprofile_radius'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='linkstyle', 15 | name='isSoftShadow', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0009_linkprofile_radius.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-25 08:29 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0008_remove_linkstyle_shadows'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='linkprofile', 15 | name='radius', 16 | field=models.IntegerField(default=0, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0004_rename_display_name_linkprofile_profile_title.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-20 06:39 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0003_remove_user_image_url'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameField( 14 | model_name='linkprofile', 15 | old_name='display_name', 16 | new_name='profile_title', 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0011_alter_linkprofile_color_hex.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-26 10:08 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0010_linkstyle_issoftshadow'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='linkprofile', 15 | name='color_hex', 16 | field=models.CharField(max_length=10, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0007_alter_linkstyle_ishardshadow.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-25 08:25 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0006_linkstyle_linkprofile_color_hex_and_more'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='linkstyle', 15 | name='isHardShadow', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /welink_web/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "welink_web", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@next/font": "13.1.6", 13 | "axios": "^1.3.3", 14 | "eslint": "8.34.0", 15 | "eslint-config-next": "13.1.6", 16 | "next": "13.1.6", 17 | "react": "18.2.0", 18 | "react-dom": "18.2.0", 19 | "react-icons": "^4.7.1", 20 | "sass": "^1.58.3" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); 14 | flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /welink_web/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /lib/models/links/style.dart: -------------------------------------------------------------------------------- 1 | class Style { 2 | final int id; 3 | final String name; 4 | final bool isFilled; 5 | final bool isHardShadow; 6 | final bool isSoftShadow; 7 | 8 | Style({ 9 | required this.id, 10 | required this.name, 11 | required this.isFilled, 12 | required this.isHardShadow, 13 | required this.isSoftShadow, 14 | }); 15 | factory Style.fromJson(Map parsedJson) { 16 | return Style( 17 | id: parsedJson['id'], 18 | name: parsedJson['name'], 19 | isFilled: parsedJson['isFilled'], 20 | isHardShadow: parsedJson['isHardShadow'], 21 | isSoftShadow: parsedJson['isSoftShadow'], 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = we_link_app 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.weLinkApp 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /lib/models/others/user.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | class User { 4 | final int id; 5 | final String username; 6 | final String firstName; 7 | final String lastName; 8 | final String email; 9 | User({ 10 | required this.id, 11 | required this.username, 12 | required this.firstName, 13 | required this.lastName, 14 | required this.email, 15 | }); 16 | factory User.fromJson(Map parsedJson) { 17 | return User( 18 | id: parsedJson['id'], 19 | username: parsedJson['username'], 20 | firstName: parsedJson['first_name'], 21 | lastName: parsedJson['last_name'], 22 | email: parsedJson['email']); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /lib/models/links/link.dart: -------------------------------------------------------------------------------- 1 | class LinkModel { 2 | final int id; 3 | final String label; 4 | final String href; 5 | final String icon; 6 | final int clicks; 7 | final bool visible; 8 | LinkModel({ 9 | required this.id, 10 | required this.label, 11 | required this.visible, 12 | required this.href, 13 | required this.icon, 14 | required this.clicks, 15 | }); 16 | factory LinkModel.fromJson(Map parsedJson) { 17 | return LinkModel( 18 | id: parsedJson['id'], 19 | visible: parsedJson['visible'], 20 | label: parsedJson['label'], 21 | href: parsedJson['href'], 22 | icon: parsedJson['icon'], 23 | clicks: parsedJson['clicks']); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /welink_backend/api/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import registerUser, checkAuthenticated, overview, RecordClick, getLinkFromUser, getStyles, updateProfile, saveLink, updateVisibility 3 | from rest_framework.authtoken.views import obtain_auth_token 4 | 5 | urlpatterns = [ 6 | path('register/', registerUser), 7 | path('login/', obtain_auth_token), 8 | path('profile//', getLinkFromUser), 9 | path('auth', checkAuthenticated), 10 | path('overview', overview), 11 | path('styles', getStyles), 12 | path('profile/update', updateProfile), 13 | path('click/record/', RecordClick), 14 | path('links/create/', saveLink), 15 | path('links/updateVisibility/', updateVisibility), 16 | 17 | 18 | ] 19 | -------------------------------------------------------------------------------- /welink_backend/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'welink_backend.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | flutter_secure_storage_linux 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | flutter_secure_storage_windows 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - flutter_secure_storage (6.0.0): 4 | - Flutter 5 | - image_picker_ios (0.0.1): 6 | - Flutter 7 | 8 | DEPENDENCIES: 9 | - Flutter (from `Flutter`) 10 | - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) 11 | - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) 12 | 13 | EXTERNAL SOURCES: 14 | Flutter: 15 | :path: Flutter 16 | flutter_secure_storage: 17 | :path: ".symlinks/plugins/flutter_secure_storage/ios" 18 | image_picker_ios: 19 | :path: ".symlinks/plugins/image_picker_ios/ios" 20 | 21 | SPEC CHECKSUMS: 22 | Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 23 | flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be 24 | image_picker_ios: 58b9c4269cb176f89acea5e5d043c9358f2d25f8 25 | 26 | PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 27 | 28 | COCOAPODS: 1.11.3 29 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0005_alter_linkprofile_avatar_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-20 08:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0004_rename_display_name_linkprofile_profile_title'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='linkprofile', 15 | name='avatar', 16 | field=models.ImageField(blank=True, null=True, upload_to=''), 17 | ), 18 | migrations.AlterField( 19 | model_name='linkprofile', 20 | name='description', 21 | field=models.CharField(blank=True, max_length=250, null=True), 22 | ), 23 | migrations.AlterField( 24 | model_name='linkprofile', 25 | name='views', 26 | field=models.IntegerField(blank=True, null=True), 27 | ), 28 | ] 29 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "we_link_app", 3 | "short_name": "we_link_app", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /welink_web/src/pages/index.js: -------------------------------------------------------------------------------- 1 | import Head from "next/head"; 2 | import Image from "next/image"; 3 | import { Inter } from "@next/font/google"; 4 | import styles from "../styles/Home.module.scss"; 5 | 6 | const inter = Inter({ subsets: ["latin"] }); 7 | 8 | export default function Home() { 9 | return ( 10 | <> 11 | 12 | Create Next App 13 | 14 | 15 | 16 | 17 |
18 |
19 |

WeLink

20 |
21 | 26 |
27 |
28 |
29 | 30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /welink_web/public/thirteen.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # weLink 2 |

Languages and Tools:

3 |

django flutter python react sass

4 | 5 | ![alt text](https://raw.githubusercontent.com/Hemsara/welink/master/assets/Screenshot%202023-02-26%20at%2012.32.50.png) 6 | ![alt text](https://raw.githubusercontent.com/Hemsara/welink/master/assets/Screenshot%202023-02-26%20at%2001.17.54.png) 7 | 8 | -------------------------------------------------------------------------------- /welink_web/public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.CreateAndShow(L"we_link_app", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.11' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | end 35 | 36 | post_install do |installer| 37 | installer.pods_project.targets.each do |target| 38 | flutter_additional_macos_build_settings(target) 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '11.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /welink_backend/api/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import AbstractUser 3 | 4 | # Create your models here. 5 | 6 | 7 | class User(AbstractUser): 8 | pass 9 | 10 | 11 | class LinkProfile(models.Model): 12 | profile_title = models.CharField(max_length=50) 13 | description = models.CharField(max_length=250, null=True, blank=True) 14 | views = models.IntegerField(null=True, blank=True, default=0) 15 | user = models.OneToOneField("User", on_delete=models.CASCADE) 16 | avatar = models.ImageField(null=True, blank=True) 17 | # decoration 18 | color_hex = models.CharField(max_length=10, null=True) 19 | radius = models.IntegerField(null=True, default=0) 20 | gradient_up = models.BooleanField(default=True) 21 | flat_color = models.BooleanField(default=False) 22 | style = models.ForeignKey("LinkStyle", on_delete=models.CASCADE, null=True) 23 | 24 | 25 | class Link(models.Model): 26 | profile = models.ForeignKey("LinkProfile", on_delete=models.CASCADE) 27 | label = models.CharField(max_length=50) 28 | href = models.CharField(max_length=2550) 29 | icon = models.CharField(max_length=2550) 30 | clicks = models.IntegerField(default=0) 31 | visible = models.BooleanField(default=True) 32 | 33 | 34 | class LinkStyle(models.Model): 35 | name = models.CharField(max_length=50) 36 | isFilled = models.BooleanField() 37 | isHardShadow = models.BooleanField(default=False) 38 | isSoftShadow = models.BooleanField(default=False) 39 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /welink_web/src/components/Link.jsx: -------------------------------------------------------------------------------- 1 | import styles from "../styles/Home.module.scss"; 2 | import axios from "axios"; 3 | import { useRouter } from "next/navigation"; 4 | 5 | const Link = ({ id, title, icon, link, style, radius }) => { 6 | const router = useRouter(); 7 | 8 | console.log(style); 9 | 10 | async function handleClick(id) { 11 | console.log("clicked"); 12 | try { 13 | const { data } = await axios.post( 14 | `http://127.0.0.1:8000/api/click/record/${id}`, 15 | { 16 | headers: { 17 | "Content-Type": "application/json", 18 | }, 19 | } 20 | ); 21 | 22 | let url = link.match(/^https?:/) ? link : "http://" + link; 23 | window.open(url, "_blank"); 24 | } catch (error) { 25 | window.open(url, "_blank"); 26 | } 27 | } 28 | return ( 29 | // handleClick(id)} 33 | // > 34 |
handleClick(id)} 36 | className={`${styles.link} ${ 37 | style.isHardShadow 38 | ? styles.shadow_hard 39 | : style.isSoftShadow 40 | ? styles.shadow_soft 41 | : "" 42 | } `} 43 | style={{ borderRadius: radius }} 44 | > 45 |
46 | 47 |
48 |
49 |

{title}

50 |

{link.length < 35 ? link : link.substring(0, 35) + "....."}

51 |
52 |
53 | ); 54 | }; 55 | 56 | export default Link; 57 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0002_linkprofile_link.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-19 21:05 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('api', '0001_initial'), 12 | ] 13 | 14 | operations = [ 15 | migrations.CreateModel( 16 | name='LinkProfile', 17 | fields=[ 18 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 19 | ('display_name', models.CharField(max_length=50)), 20 | ('description', models.CharField(max_length=50)), 21 | ('views', models.IntegerField()), 22 | ('avatar', models.ImageField(upload_to='')), 23 | ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 24 | ], 25 | ), 26 | migrations.CreateModel( 27 | name='Link', 28 | fields=[ 29 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 30 | ('label', models.CharField(max_length=50)), 31 | ('href', models.CharField(max_length=50)), 32 | ('icon', models.ImageField(upload_to='')), 33 | ('clicks', models.IntegerField()), 34 | ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.linkprofile')), 35 | ], 36 | ), 37 | ] 38 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: 135454af32477f815a7525073027a3ff9eff1bfd 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 17 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 18 | - platform: android 19 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 20 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 21 | - platform: ios 22 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 23 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 24 | - platform: linux 25 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 26 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 27 | - platform: macos 28 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 29 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 30 | - platform: web 31 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 32 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 33 | - platform: windows 34 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 35 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /welink_web/README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | # or 12 | pnpm dev 13 | ``` 14 | 15 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 16 | 17 | You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. 18 | 19 | [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. 20 | 21 | The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. 22 | 23 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 24 | 25 | ## Learn More 26 | 27 | To learn more about Next.js, take a look at the following resources: 28 | 29 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 30 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 31 | 32 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 33 | 34 | ## Deploy on Vercel 35 | 36 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 37 | 38 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 39 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 37 | 38 | # Run the Flutter tool portions of the build. This must not be removed. 39 | add_dependencies(${BINARY_NAME} flutter_assemble) 40 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | We Link App 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | we_link_app 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /lib/views/app/links/link_list.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | import 'package:iconsax/iconsax.dart'; 6 | import 'package:provider/provider.dart'; 7 | import 'package:we_link_app/providers/links_provider.dart'; 8 | import 'package:we_link_app/res/colors.dart'; 9 | import 'package:we_link_app/res/ui.dart'; 10 | 11 | import 'package:we_link_app/views/app/links/widgets/detaild_link_view.dart'; 12 | 13 | class LinkListScreen extends StatefulWidget { 14 | const LinkListScreen({super.key}); 15 | 16 | @override 17 | State createState() => _LinkListScreenState(); 18 | } 19 | 20 | class _LinkListScreenState extends State { 21 | @override 22 | Widget build(BuildContext context) { 23 | return Padding( 24 | padding: EdgeInsets.all(AppUi.scaffoldPadding), 25 | child: Scaffold( 26 | floatingActionButton: FloatingActionButton( 27 | backgroundColor: AppColors.blueColor, 28 | child: Icon(Iconsax.add), 29 | onPressed: () => Navigator.pushNamed(context, '/add'), 30 | ), 31 | backgroundColor: AppColors.scaffoldColor, 32 | body: SingleChildScrollView( 33 | child: Column( 34 | crossAxisAlignment: CrossAxisAlignment.start, 35 | children: [ 36 | Text( 37 | "Manage your links", 38 | style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600), 39 | ), 40 | SizedBox(height: 10), 41 | Consumer( 42 | builder: (context, value, child) { 43 | return Column( 44 | children: value.profile.links 45 | .map((e) => DetailedLinkView(link: e)) 46 | .toList(), 47 | ); 48 | }, 49 | ) 50 | ], 51 | )), 52 | ), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr); 51 | std::string utf8_string; 52 | if (target_length == 0 || target_length > utf8_string.max_size()) { 53 | return utf8_string; 54 | } 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | return true; 30 | } 31 | 32 | void FlutterWindow::OnDestroy() { 33 | if (flutter_controller_) { 34 | flutter_controller_ = nullptr; 35 | } 36 | 37 | Win32Window::OnDestroy(); 38 | } 39 | 40 | LRESULT 41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 42 | WPARAM const wparam, 43 | LPARAM const lparam) noexcept { 44 | // Give Flutter, including plugins, an opportunity to handle window messages. 45 | if (flutter_controller_) { 46 | std::optional result = 47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 48 | lparam); 49 | if (result) { 50 | return *result; 51 | } 52 | } 53 | 54 | switch (message) { 55 | case WM_FONTCHANGE: 56 | flutter_controller_->engine()->ReloadSystemFonts(); 57 | break; 58 | } 59 | 60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 61 | } 62 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0006_linkstyle_linkprofile_color_hex_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-25 08:21 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('api', '0005_alter_linkprofile_avatar_and_more'), 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='LinkStyle', 16 | fields=[ 17 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('name', models.CharField(max_length=50)), 19 | ('isFilled', models.BooleanField()), 20 | ('shadows', models.IntegerField()), 21 | ('isHardShadow', models.IntegerField()), 22 | ], 23 | ), 24 | migrations.AddField( 25 | model_name='linkprofile', 26 | name='color_hex', 27 | field=models.CharField(max_length=6, null=True), 28 | ), 29 | migrations.AddField( 30 | model_name='linkprofile', 31 | name='flat_color', 32 | field=models.BooleanField(default=False), 33 | ), 34 | migrations.AddField( 35 | model_name='linkprofile', 36 | name='gradient_up', 37 | field=models.BooleanField(default=True), 38 | ), 39 | migrations.AlterField( 40 | model_name='link', 41 | name='clicks', 42 | field=models.IntegerField(default=0), 43 | ), 44 | migrations.AlterField( 45 | model_name='linkprofile', 46 | name='views', 47 | field=models.IntegerField(blank=True, default=0, null=True), 48 | ), 49 | migrations.AddField( 50 | model_name='linkprofile', 51 | name='style', 52 | field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='api.linkstyle'), 53 | ), 54 | ] 55 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | we_link_app 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /lib/views/app/home.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:iconsax/iconsax.dart'; 3 | import 'package:we_link_app/res/colors.dart'; 4 | import 'package:we_link_app/views/app/edit/edit_screen.dart'; 5 | import 'package:we_link_app/views/app/home/home_screen.dart'; 6 | import 'package:we_link_app/views/app/links/link_list.dart'; 7 | 8 | class Home extends StatefulWidget { 9 | const Home({super.key}); 10 | 11 | @override 12 | State createState() => _HomeState(); 13 | } 14 | 15 | class _HomeState extends State { 16 | int _selectedIndex = 0; 17 | static const List _widgetOptions = [ 18 | HomeScreen(), 19 | LinkListScreen(), 20 | Text( 21 | 'Index 1: Business', 22 | ), 23 | EditLinkProfile(), 24 | ]; 25 | void _onItemTapped(int index) { 26 | setState(() { 27 | _selectedIndex = index; 28 | }); 29 | } 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return Scaffold( 34 | bottomNavigationBar: BottomNavigationBar( 35 | unselectedLabelStyle: const TextStyle(fontSize: 11), 36 | selectedLabelStyle: const TextStyle(fontSize: 11), 37 | currentIndex: _selectedIndex, 38 | onTap: _onItemTapped, 39 | type: BottomNavigationBarType.fixed, 40 | items: const [ 41 | BottomNavigationBarItem( 42 | label: "Home", 43 | icon: Icon(Iconsax.home), 44 | ), 45 | BottomNavigationBarItem( 46 | label: "Links", 47 | icon: Icon(Iconsax.link_1), 48 | ), 49 | BottomNavigationBarItem( 50 | label: "Stats", 51 | icon: Icon(Iconsax.chart), 52 | ), 53 | BottomNavigationBarItem( 54 | label: "Appearance", 55 | icon: Icon(Iconsax.edit), 56 | ), 57 | BottomNavigationBarItem( 58 | label: "Settings", 59 | icon: Icon(Iconsax.setting), 60 | ), 61 | ]), 62 | backgroundColor: AppColors.scaffoldColor, 63 | body: SafeArea( 64 | child: _widgetOptions.elementAt(_selectedIndex), 65 | ), 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors, prefer_const_literals_to_create_immutables 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:provider/provider.dart'; 5 | import 'package:we_link_app/models/others/response.dart'; 6 | import 'package:we_link_app/providers/auth_provider.dart'; 7 | import 'package:we_link_app/providers/links_provider.dart'; 8 | import 'package:we_link_app/res/constants.dart'; 9 | import 'package:we_link_app/services/network_service.dart'; 10 | import 'package:we_link_app/views/app/links/screens/add_link.dart'; 11 | import 'package:we_link_app/views/auth/create_account_screen.dart'; 12 | import 'package:we_link_app/views/auth/login_screen.dart'; 13 | import 'package:we_link_app/views/app/home.dart'; 14 | 15 | void main() async { 16 | WidgetsFlutterBinding.ensureInitialized(); 17 | bool auth = await checkAuthenticated(); 18 | 19 | runApp( 20 | MultiProvider( 21 | providers: [ 22 | ChangeNotifierProvider( 23 | create: (context) => AuthProvider(), 24 | ), 25 | ChangeNotifierProvider( 26 | create: (context) => LinkProvider(), 27 | ), 28 | ], 29 | child: WeLinkApp(auth: auth), 30 | ), 31 | ); 32 | } 33 | 34 | class WeLinkApp extends StatelessWidget { 35 | final bool auth; 36 | const WeLinkApp({super.key, required this.auth}); 37 | 38 | // This widget is the root of your application. 39 | @override 40 | Widget build(BuildContext context) { 41 | return MaterialApp( 42 | routes: { 43 | '/home': (context) => Home(), 44 | '/login': (context) => LoginScreen(), 45 | '/add': (context) => AddLinkScreen(), 46 | '/signup': (context) => CreateAccountScreen(), 47 | }, 48 | debugShowCheckedModeBanner: false, 49 | initialRoute: auth ? '/home' : '/login', 50 | ); 51 | } 52 | } 53 | 54 | Future checkAuthenticated() async { 55 | try { 56 | NetworkService api = NetworkService(baseURL: '${AppConstants.host}/api'); 57 | Response rs = await api.get(mustAuthenticated: true, endpoint: '/auth'); 58 | if (rs.status == ResponseStatus.success) { 59 | return true; 60 | } 61 | return false; 62 | } catch (e) { 63 | return false; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/providers/auth_provider.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 5 | import 'package:we_link_app/models/others/response.dart'; 6 | import 'package:we_link_app/services/network_service.dart'; 7 | 8 | import '../res/constants.dart'; 9 | 10 | class AuthProvider extends ChangeNotifier { 11 | bool _isLoading = false; 12 | bool get isLoading => _isLoading; 13 | 14 | final NetworkService _networkService = 15 | NetworkService(baseURL: '${AppConstants.host}/api'); 16 | 17 | Future login(String username, String password) async { 18 | try { 19 | _isLoading = true; 20 | notifyListeners(); 21 | 22 | await Future.delayed(const Duration(seconds: 1)); 23 | Response res = await _networkService.post( 24 | mustAuthenticated: false, 25 | endpoint: '/login/', 26 | data: {"username": username, "password": password}); 27 | if (res.status == ResponseStatus.success) { 28 | const storage = FlutterSecureStorage(); 29 | await storage.deleteAll(); 30 | await storage.write(key: 'token', value: res.data!['token']); 31 | } 32 | 33 | _isLoading = false; 34 | notifyListeners(); 35 | return res; 36 | } on SocketException { 37 | _isLoading = false; 38 | notifyListeners(); 39 | return Response( 40 | status: ResponseStatus.failed, 41 | errors: ["Unable to connect to the server"]); 42 | } catch (e) { 43 | _isLoading = false; 44 | notifyListeners(); 45 | return Response(status: ResponseStatus.failed, errors: [e.toString()]); 46 | } 47 | } 48 | 49 | Future createUser( 50 | {required String email, 51 | required String username, 52 | required String password}) async { 53 | try { 54 | _isLoading = true; 55 | notifyListeners(); 56 | 57 | await Future.delayed(const Duration(seconds: 1)); 58 | 59 | Response rs = await _networkService 60 | .post(mustAuthenticated: false, endpoint: '/register/', data: { 61 | "username": username, 62 | "email": email, 63 | "password": password, 64 | }); 65 | _isLoading = false; 66 | notifyListeners(); 67 | return rs; 68 | } catch (e) { 69 | return Response(status: ResponseStatus.failed, errors: [e.toString()]); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /welink_web/src/styles/Home.module.scss: -------------------------------------------------------------------------------- 1 | .link_preview { 2 | a { 3 | text-decoration: none; 4 | color: inherit; 5 | } 6 | 7 | display: flex; 8 | justify-content: center; 9 | align-items: center; 10 | 11 | 12 | height: 100vh; 13 | 14 | .center { 15 | display: flex; 16 | flex-direction: column; 17 | 18 | align-items: center; 19 | 20 | .avatar { 21 | display: grid; 22 | place-items: center; 23 | border-radius: 50%; 24 | width: 70px; 25 | height: 70px; 26 | background-color: #07acf328; 27 | 28 | 29 | img { 30 | width: 100%; 31 | height: 100%; 32 | object-fit: cover; 33 | border-radius: 50%; 34 | } 35 | } 36 | 37 | h1 { 38 | margin-top: 20px; 39 | font-size: 1em; 40 | font-weight: 500; 41 | } 42 | 43 | p { 44 | text-align: center; 45 | width: 100%; 46 | color: grey; 47 | font-weight: 300; 48 | font-size: .7em; 49 | } 50 | 51 | .link_list { 52 | margin-top: 20px; 53 | } 54 | } 55 | 56 | } 57 | 58 | .shadow_hard { 59 | box-shadow: 3px 3px 0px 0px rgba(0, 0, 0, 0.75); 60 | } 61 | 62 | .shadow_soft { 63 | box-shadow: 3px 3px 4px 0px rgba(0, 0, 0, 0.3); 64 | } 65 | 66 | .link { 67 | 68 | 69 | cursor: pointer; 70 | transition-duration: 0.5s; 71 | display: flex; 72 | align-items: center; 73 | width: 370px; 74 | padding: 10px; 75 | margin-top: 10px; 76 | border: 1px solid black; 77 | 78 | 79 | 80 | &:hover { 81 | transform: scale(1.02); 82 | } 83 | 84 | .icon { 85 | background-color: rgb(247, 247, 247); 86 | margin-right: 10px; 87 | width: 25px; 88 | border-radius: 50%; 89 | height: 25px; 90 | display: grid; 91 | place-items: center; 92 | 93 | img { 94 | width: 50%; 95 | height: 50%; 96 | object-fit: cover; 97 | } 98 | } 99 | 100 | h4 { 101 | font-size: .67em; 102 | font-weight: 500; 103 | 104 | } 105 | 106 | p { 107 | font-size: .55em !important; 108 | } 109 | } -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.example.we_link_app" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 50 | minSdkVersion flutter.minSdkVersion 51 | targetSdkVersion flutter.targetSdkVersion 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | } 55 | 56 | buildTypes { 57 | release { 58 | // TODO: Add your own signing config for the release build. 59 | // Signing with the debug keys for now, so `flutter run --release` works. 60 | signingConfig signingConfigs.debug 61 | } 62 | } 63 | } 64 | 65 | flutter { 66 | source '../..' 67 | } 68 | 69 | dependencies { 70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 71 | } 72 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/models/links/link_profile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:we_link_app/models/links/link.dart'; 3 | import 'package:we_link_app/models/links/style.dart'; 4 | import 'package:we_link_app/models/others/user.dart'; 5 | 6 | class LinkProfileFields { 7 | static const String id = "id"; 8 | static const String user = "user"; 9 | static const String profileTitle = "profile_title"; 10 | static const String description = "description"; 11 | static const String views = "views"; 12 | static const String gradientUp = "gradient_up"; 13 | static const String clicks = "clicks"; 14 | static const String links = "links"; 15 | static const String avatar = "avatar"; 16 | static const String style = "style"; 17 | static const String radius = "radius"; 18 | static const String flatColor = "flat_color"; 19 | static const String bgColor = "color_hex"; 20 | } 21 | 22 | class LinkProfile { 23 | final int id; 24 | final User user; 25 | final String profileTitle; 26 | final String description; 27 | final int views; 28 | final int radius; 29 | final bool gradient_up; 30 | final bool flatColor; 31 | final Color bgColor; 32 | final int clicks; 33 | final List links; 34 | final String? avatar; 35 | final Style style; 36 | LinkProfile({ 37 | required this.id, 38 | required this.style, 39 | required this.flatColor, 40 | required this.user, 41 | required this.clicks, 42 | required this.profileTitle, 43 | required this.radius, 44 | required this.gradient_up, 45 | required this.description, 46 | required this.bgColor, 47 | required this.views, 48 | required this.links, 49 | required this.avatar, 50 | }); 51 | factory LinkProfile.fromJson(Map parsedJson) { 52 | List linksJson = parsedJson[LinkProfileFields.links] as List; 53 | List links = 54 | linksJson.map((e) => LinkModel.fromJson(e)).toList(); 55 | 56 | return LinkProfile( 57 | id: parsedJson[LinkProfileFields.id], 58 | radius: parsedJson[LinkProfileFields.radius], 59 | bgColor: 60 | Color(int.parse('0xff${parsedJson[LinkProfileFields.bgColor]}')), 61 | clicks: parsedJson[LinkProfileFields.clicks], 62 | flatColor: parsedJson[LinkProfileFields.flatColor], 63 | style: Style.fromJson(parsedJson[LinkProfileFields.style]), 64 | gradient_up: parsedJson[LinkProfileFields.gradientUp], 65 | user: User.fromJson(parsedJson[LinkProfileFields.user]), 66 | profileTitle: parsedJson[LinkProfileFields.profileTitle], 67 | description: parsedJson[LinkProfileFields.description] ?? "", 68 | views: parsedJson[LinkProfileFields.views] ?? 0, 69 | links: links, 70 | avatar: parsedJson[LinkProfileFields.avatar]); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /welink_backend/api/serializers.py: -------------------------------------------------------------------------------- 1 | 2 | from rest_framework import serializers 3 | from .models import User, Link, LinkProfile, LinkStyle 4 | 5 | 6 | class UserCreateSerializer(serializers.ModelSerializer): 7 | class Meta: 8 | model = User 9 | fields = ('username', 'password', 'email') 10 | 11 | def create(self, validated_data): 12 | password = validated_data.pop('password', None) 13 | instance = self.Meta.model(**validated_data) 14 | if password is not None: 15 | instance.set_password(password) 16 | 17 | instance.save() 18 | return instance 19 | 20 | 21 | class UserSerializer(serializers.ModelSerializer): 22 | class Meta: 23 | model = User 24 | fields = ('id', 'username', 'first_name', 'last_name', 'email') 25 | 26 | 27 | class LinkSerializer(serializers.ModelSerializer): 28 | class Meta: 29 | model = Link 30 | fields = "__all__" 31 | 32 | 33 | class LinkStyleSerializer(serializers.ModelSerializer): 34 | class Meta: 35 | model = LinkStyle 36 | fields = "__all__" 37 | 38 | 39 | class LinkViewOnlySerializer(serializers.ModelSerializer): 40 | class Meta: 41 | model = Link 42 | fields = ('id', 'label', 'href', 'icon') 43 | depth = 2 44 | 45 | 46 | class LinkProfileSerializer(serializers.ModelSerializer): 47 | links = serializers.SerializerMethodField() 48 | user = UserSerializer() 49 | clicks = serializers.SerializerMethodField() 50 | style = LinkStyleSerializer() 51 | 52 | class Meta: 53 | depth: 2 54 | model = LinkProfile 55 | fields = "__all__" 56 | 57 | def get_clicks(self, obj): 58 | clicks = 0 59 | links = Link.objects.filter(profile=obj) 60 | for x in links: 61 | clicks += x.clicks 62 | return clicks 63 | 64 | def get_links(self, obj): 65 | links = Link.objects.filter(profile=obj) 66 | print(links) 67 | data = LinkSerializer(links, many=True).data 68 | return data 69 | 70 | def update(self, instance, validated_data): 71 | print("wohoooo") 72 | return instance 73 | 74 | 75 | class ProfileViewSerializer(serializers.ModelSerializer): 76 | links = serializers.SerializerMethodField() 77 | style = LinkStyleSerializer(read_only=True) 78 | 79 | class Meta: 80 | model = LinkProfile 81 | fields = ('id', 'links', 'profile_title', 82 | 'description', 'avatar', 'style', 'radius', 'gradient_up', 'color_hex') 83 | 84 | def get_links(self, obj): 85 | links = Link.objects.filter(profile=obj, visible=True) 86 | data = LinkViewOnlySerializer(links, many=True).data 87 | return data 88 | 89 | 90 | class ProfileUpdateSerializer(serializers.ModelSerializer): 91 | 92 | class Meta: 93 | model = LinkProfile 94 | fields = "__all__" 95 | -------------------------------------------------------------------------------- /welink_web/src/pages/[username]/index.jsx: -------------------------------------------------------------------------------- 1 | import Link from "@/components/Link"; 2 | import styles from "../../styles/Home.module.scss"; 3 | import axios from "axios"; 4 | import logo from "../../../public/logo.png"; 5 | import Head from "next/head"; 6 | import { AiOutlineUser } from "react-icons/ai"; 7 | const LinkView = (props) => { 8 | // console.log(router.query["username"]); 9 | console.log(props.data.gradient_up); 10 | return typeof props.data !== "string" ? ( 11 |
21 | 22 | WeLink | {props.data.profile_title} 23 | 24 | 25 |
26 |
27 | {props.data.avatar ? ( 28 | 29 | ) : ( 30 | <> 31 | {" "} 32 | 33 | )} 34 |
35 |

{props.data.profile_title}

36 |

{props.data.description}

37 |
38 | {props.data.links.map((e) => ( 39 | 47 | ))} 48 |
49 |
50 |
51 | ) : ( 52 |
{props.data}
53 | ); 54 | }; 55 | export async function getServerSideProps(context) { 56 | const slug = context.params.username; 57 | 58 | try { 59 | const response = await axios.get( 60 | `http://127.0.0.1:8000/api/profile/${slug}` 61 | ); 62 | console.log(response.status); 63 | 64 | return { 65 | props: { 66 | data: response.data["data"], 67 | }, 68 | }; 69 | } catch (error) { 70 | console.log(error); 71 | if (error.status) { 72 | switch (error.response.status) { 73 | case 404: 74 | return { 75 | props: { 76 | data: "User does't exist", 77 | }, 78 | }; 79 | default: 80 | return { 81 | props: { 82 | data: "Something went wrong", 83 | }, 84 | }; 85 | } 86 | } 87 | return { 88 | props: { 89 | data: "Could't reach the server ⚠️", 90 | }, 91 | }; 92 | } 93 | } 94 | 95 | export default LinkView; 96 | -------------------------------------------------------------------------------- /lib/views/components/textfield.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class TextInput extends StatefulWidget { 7 | final TextEditingController controller; 8 | final String? matchText; 9 | final String label; 10 | final bool obscured; 11 | final bool hasMatchingTextField; 12 | 13 | const TextInput({ 14 | Key? key, 15 | this.matchText, 16 | required this.controller, 17 | this.hasMatchingTextField = false, 18 | required this.label, 19 | required this.obscured, 20 | }) : super(key: key); 21 | 22 | @override 23 | State createState() => _TextInputState(); 24 | } 25 | 26 | class _TextInputState extends State { 27 | late bool _passwordVisible; 28 | 29 | @override 30 | void initState() { 31 | _passwordVisible = widget.obscured; 32 | super.initState(); 33 | } 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | return Padding( 38 | padding: const EdgeInsets.only(top: 12.0), 39 | child: TextFormField( 40 | controller: widget.controller, 41 | validator: (value) { 42 | if (value == null || value.isEmpty) { 43 | return '*This field is required'; 44 | } 45 | if (widget.hasMatchingTextField) { 46 | if (value != widget.matchText) { 47 | return "*Password doesn't match"; 48 | } 49 | } 50 | 51 | return null; 52 | }, 53 | obscureText: _passwordVisible, 54 | decoration: InputDecoration( 55 | suffixIcon: widget.obscured 56 | ? GestureDetector( 57 | onTap: () { 58 | setState(() { 59 | _passwordVisible = !_passwordVisible; 60 | }); 61 | }, 62 | child: Icon( 63 | _passwordVisible 64 | ? CupertinoIcons.eye 65 | : CupertinoIcons.eye_slash, 66 | size: 18, 67 | ), 68 | ) 69 | : null, 70 | hintText: widget.label, 71 | hintStyle: TextStyle(fontSize: 13), 72 | enabledBorder: OutlineInputBorder( 73 | borderRadius: BorderRadius.circular(15), 74 | borderSide: BorderSide(color: Colors.grey, width: 0.0), 75 | ), 76 | errorBorder: OutlineInputBorder( 77 | borderRadius: BorderRadius.circular(15), 78 | borderSide: BorderSide(color: Colors.redAccent, width: 0.0), 79 | ), 80 | focusedErrorBorder: OutlineInputBorder( 81 | borderRadius: BorderRadius.circular(15), 82 | borderSide: BorderSide(color: Colors.redAccent, width: 0.0), 83 | ), 84 | focusedBorder: 85 | OutlineInputBorder(borderRadius: BorderRadius.circular(15)), 86 | ), 87 | ), 88 | ); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /welink_backend/api/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-16 08:09 2 | 3 | import django.contrib.auth.models 4 | import django.contrib.auth.validators 5 | from django.db import migrations, models 6 | import django.utils.timezone 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | initial = True 12 | 13 | dependencies = [ 14 | ('auth', '0012_alter_user_first_name_max_length'), 15 | ] 16 | 17 | operations = [ 18 | migrations.CreateModel( 19 | name='User', 20 | fields=[ 21 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 22 | ('password', models.CharField(max_length=128, verbose_name='password')), 23 | ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), 24 | ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), 25 | ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), 26 | ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')), 27 | ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), 28 | ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), 29 | ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), 30 | ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), 31 | ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), 32 | ('image_url', models.CharField(max_length=3550, null=True)), 33 | ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')), 34 | ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')), 35 | ], 36 | options={ 37 | 'verbose_name': 'user', 38 | 'verbose_name_plural': 'users', 39 | 'abstract': False, 40 | }, 41 | managers=[ 42 | ('objects', django.contrib.auth.models.UserManager()), 43 | ], 44 | ), 45 | ] 46 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/providers/links_provider.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: avoid_print 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:we_link_app/models/links/link.dart'; 5 | import 'package:we_link_app/models/links/link_profile.dart'; 6 | import 'package:we_link_app/models/links/style.dart'; 7 | import 'package:we_link_app/models/others/response.dart'; 8 | import 'package:we_link_app/services/network_service.dart'; 9 | 10 | import '../res/constants.dart'; 11 | 12 | class LinkProvider extends ChangeNotifier { 13 | final NetworkService _networkService = 14 | NetworkService(baseURL: '${AppConstants.host}/api'); 15 | bool _fetching = false; 16 | bool _saving = false; 17 | 18 | bool get fetching => _fetching; 19 | bool get saving => _saving; 20 | 21 | late LinkProfile _profile; 22 | late List