Skip to content

Commit d428251

Browse files
committed
feat(init): initialize DeepSeek Flutter clone project
- Implement core chat interface with message streaming support
0 parents  commit d428251

109 files changed

Lines changed: 4454 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.build/
9+
.buildlog/
10+
.history
11+
.svn/
12+
.swiftpm/
13+
migrate_working_dir/
14+
15+
# IntelliJ related
16+
*.iml
17+
*.ipr
18+
*.iws
19+
.idea/
20+
21+
# The .vscode folder contains launch configuration and tasks you configure in
22+
# VS Code which you may wish to be included in version control, so this line
23+
# is commented out by default.
24+
#.vscode/
25+
26+
# Flutter/Dart/Pub related
27+
**/doc/api/
28+
**/ios/Flutter/.last_build_id
29+
.dart_tool/
30+
.flutter-plugins
31+
.flutter-plugins-dependencies
32+
.pub-cache/
33+
.pub/
34+
/build/
35+
36+
# Symbolication related
37+
app.*.symbols
38+
39+
# Obfuscation related
40+
app.*.map.json
41+
42+
# Android Studio will place build artifacts here
43+
/android/app/debug
44+
/android/app/profile
45+
/android/app/release

.metadata

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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 and should not be manually edited.
5+
6+
version:
7+
revision: "35c388afb57ef061d06a39b537336c87e0e3d1b1"
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: 35c388afb57ef061d06a39b537336c87e0e3d1b1
17+
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
18+
- platform: android
19+
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
20+
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
21+
- platform: ios
22+
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
23+
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
24+
25+
# User provided section
26+
27+
# List of Local paths (relative to this file) that should be
28+
# ignored by the migrate tool.
29+
#
30+
# Files that are not part of the templates will be ignored by default.
31+
unmanaged_files:
32+
- 'lib/main.dart'
33+
- 'ios/Runner.xcodeproj/project.pbxproj'

README.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# DeepSeek Flutter Clone 🤖💬
2+
3+
<div align="center">
4+
<img src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/logo.svg?raw=true" width="60%" alt="DeepSeek-R1" />
5+
</div>
6+
7+
[![Flutter Version](https://img.shields.io/badge/Flutter-3.29%2B-blue)](https://flutter.dev)
8+
[![Dart Version](https://img.shields.io/badge/Dart-3.7%2B-blue)](https://dart.dev)
9+
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
10+
11+
A Flutter-based intelligent chat application replicating DeepSeek's core features, integrating advanced large language model (LLM) capabilities with cross-platform support.
12+
13+
<p align="center">
14+
<img src="screenshots/demo.jpg" width="300" alt="Demo Preview">
15+
</p>
16+
17+
## ✨ Key Features
18+
19+
- **Intelligent Chat Interaction**
20+
- Continuous conversation context management
21+
- Real-time streaming responses
22+
- Message history preservation
23+
- Markdown rendering
24+
- Copy chat content
25+
26+
- **User-Friendly Interface**
27+
- Adaptive light/dark themes (TODO)
28+
- Responsive layout design
29+
- Interactive animations
30+
- Conversation session management
31+
- Multi-language support (i18n)
32+
33+
- **Advanced Capabilities**
34+
- Custom API endpoint configuration
35+
- Token usage statistics (TODO)
36+
- Chat content search (TODO)
37+
- System prompt templates (TODO)
38+
- Network status monitoring (TODO)
39+
40+
## 🚀 Quick Start
41+
42+
### Requirements
43+
- Flutter 3.29+
44+
- Dart 3.7+
45+
- Android Studio/VSCode
46+
- iOS/Android simulator or physical device
47+
48+
### Installation
49+
```bash
50+
# Clone repository
51+
git clone https://github.com/luodeb/deepseek-flutter-clone.git
52+
53+
# Enter project directory
54+
cd deepseek-flutter-clone
55+
56+
# Install dependencies
57+
flutter pub get
58+
59+
# Run application
60+
flutter run
61+
```
62+
63+
## ⚙️ Configuration
64+
65+
1. Create `api_config.dart` in `lib/configs` directory
66+
2. Add your API configuration:
67+
```dart
68+
const String apiKey = 'YOUR_API_KEY';
69+
const String baseUrl = 'YOUR_API_ENDPOINT';
70+
```
71+
72+
## 📸 Screenshots
73+
74+
| Chat Interface | History | Settings |
75+
|----------|----------|----------|
76+
| <img src="screenshots/main.jpg" width="300"> | <img src="screenshots/drawer.jpg" width="300"> | <img src="screenshots/settings.jpg" width="300"> |
77+
78+
## 📁 Project Structure
79+
80+
```
81+
├── app
82+
│ ├── middleware
83+
│ ├── modules
84+
│ │ ├── dashboard
85+
│ │ │ ├── bindings
86+
│ │ │ ├── controllers
87+
│ │ │ └── views
88+
│ │ ├── language
89+
│ │ │ ├── bindings
90+
│ │ │ ├── controllers
91+
│ │ │ └── views
92+
│ │ └── settings
93+
│ │ ├── bindings
94+
│ │ ├── children
95+
│ │ │ ├── dark_mode
96+
│ │ │ │ ├── bindings
97+
│ │ │ │ ├── controllers
98+
│ │ │ │ └── views
99+
│ │ │ ├── model
100+
│ │ │ │ ├── bindings
101+
│ │ │ │ ├── controllers
102+
│ │ │ │ └── views
103+
│ │ │ └── others
104+
│ │ ├── controllers
105+
│ │ └── views
106+
│ └── routes
107+
├── configs
108+
│ ├── localization
109+
│ │ ├── ar_AR
110+
│ │ ├── en_US
111+
│ │ └── zh_CN
112+
│ └── theme
113+
├── models
114+
├── utils
115+
└── widgets
116+
```
117+
118+
## 🤝 Contributing
119+
120+
1. Fork the project
121+
2. Create feature branch (`git checkout -b feature/AmazingFeature`)
122+
3. Commit changes (`git commit -m 'Add some AmazingFeature'`)
123+
4. Push branch (`git push origin feature/AmazingFeature`)
124+
5. Open Pull Request
125+
126+
## 📄 License
127+
128+
Distributed under [MIT License](LICENSE)
129+
130+
---
131+
132+
**Note**: Ensure proper API access authorization before use. This application requires integration with LLM APIs.
133+

analysis_options.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 https://dart.dev/lints.
17+
#
18+
# Instead of disabling a lint rule for the entire project in the
19+
# section below, it can also be suppressed for a single line of code
20+
# or a specific dart file by using the `// ignore: name_of_lint` and
21+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
22+
# producing the lint.
23+
rules:
24+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26+
27+
# Additional information about this file can be found at
28+
# https://dart.dev/guides/language/analysis-options

android/.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
.cxx/
9+
10+
# Remember to never publicly share your keystore.
11+
# See https://flutter.dev/to/reference-keystore
12+
key.properties
13+
**/*.keystore
14+
**/*.jks

android/app/build.gradle.kts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
plugins {
2+
id("com.android.application")
3+
id("kotlin-android")
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id("dev.flutter.flutter-gradle-plugin")
6+
}
7+
8+
android {
9+
namespace = "com.example.deepseek"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = "27.0.12077973"
12+
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_11
15+
targetCompatibility = JavaVersion.VERSION_11
16+
}
17+
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_11.toString()
20+
}
21+
22+
defaultConfig {
23+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24+
applicationId = "com.example.deepseek"
25+
// You can update the following values to match your application needs.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
27+
minSdk = flutter.minSdkVersion
28+
targetSdk = flutter.targetSdkVersion
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
31+
}
32+
33+
buildTypes {
34+
release {
35+
// TODO: Add your own signing config for the release build.
36+
// Signing with the debug keys for now, so `flutter run --release` works.
37+
signingConfig = signingConfigs.getByName("debug")
38+
}
39+
}
40+
}
41+
42+
flutter {
43+
source = "../.."
44+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<application
3+
android:label="deepseek"
4+
android:name="${applicationName}"
5+
android:icon="@mipmap/ic_launcher">
6+
<activity
7+
android:name=".MainActivity"
8+
android:exported="true"
9+
android:launchMode="singleTop"
10+
android:taskAffinity=""
11+
android:theme="@style/LaunchTheme"
12+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
13+
android:hardwareAccelerated="true"
14+
android:windowSoftInputMode="adjustResize">
15+
<!-- Specifies an Android theme to apply to this Activity as soon as
16+
the Android process has started. This theme is visible to the user
17+
while the Flutter UI initializes. After that, this theme continues
18+
to determine the Window background behind the Flutter UI. -->
19+
<meta-data
20+
android:name="io.flutter.embedding.android.NormalTheme"
21+
android:resource="@style/NormalTheme"
22+
/>
23+
<intent-filter>
24+
<action android:name="android.intent.action.MAIN"/>
25+
<category android:name="android.intent.category.LAUNCHER"/>
26+
</intent-filter>
27+
</activity>
28+
<!-- Don't delete the meta-data below.
29+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
30+
<meta-data
31+
android:name="flutterEmbedding"
32+
android:value="2" />
33+
</application>
34+
<uses-permission android:name="android.permission.INTERNET"/>
35+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
36+
<!-- Required to query activities that can process text, see:
37+
https://developer.android.com/training/package-visibility and
38+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
39+
40+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
41+
<queries>
42+
<intent>
43+
<action android:name="android.intent.action.PROCESS_TEXT"/>
44+
<data android:mimeType="text/plain"/>
45+
</intent>
46+
</queries>
47+
</manifest>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.example.deepseek
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity : FlutterActivity()
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>

0 commit comments

Comments
 (0)