@doppelgangerdev/doppelganger 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +9 -0
- package/.github/workflows/docker-publish.yml +59 -0
- package/CODE_OF_CONDUCT.md +28 -0
- package/CONTRIBUTING.md +42 -0
- package/Dockerfile +44 -0
- package/LICENSE +163 -0
- package/README.md +133 -0
- package/TERMS.md +16 -0
- package/THIRD_PARTY_LICENSES.md +3502 -0
- package/agent.js +1240 -0
- package/headful.js +171 -0
- package/index.html +21 -0
- package/n8n-nodes-doppelganger/LICENSE +201 -0
- package/n8n-nodes-doppelganger/README.md +42 -0
- package/n8n-nodes-doppelganger/package-lock.json +6128 -0
- package/n8n-nodes-doppelganger/package.json +36 -0
- package/n8n-nodes-doppelganger/src/credentials/DoppelgangerApi.credentials.ts +35 -0
- package/n8n-nodes-doppelganger/src/index.ts +4 -0
- package/n8n-nodes-doppelganger/src/nodes/Doppelganger/Doppelganger.node.ts +147 -0
- package/n8n-nodes-doppelganger/src/nodes/Doppelganger/icon.png +0 -0
- package/n8n-nodes-doppelganger/tsconfig.json +14 -0
- package/package.json +45 -0
- package/postcss.config.js +6 -0
- package/public/icon.png +0 -0
- package/public/novnc.html +151 -0
- package/public/styles.css +86 -0
- package/scrape.js +389 -0
- package/server.js +875 -0
- package/src/App.tsx +722 -0
- package/src/components/AuthScreen.tsx +95 -0
- package/src/components/CodeEditor.tsx +70 -0
- package/src/components/DashboardScreen.tsx +133 -0
- package/src/components/EditorScreen.tsx +1519 -0
- package/src/components/ExecutionDetailScreen.tsx +115 -0
- package/src/components/ExecutionsScreen.tsx +156 -0
- package/src/components/LoadingScreen.tsx +26 -0
- package/src/components/NotFoundScreen.tsx +34 -0
- package/src/components/RichInput.tsx +68 -0
- package/src/components/SettingsScreen.tsx +228 -0
- package/src/components/Sidebar.tsx +61 -0
- package/src/components/app/CenterAlert.tsx +44 -0
- package/src/components/app/CenterConfirm.tsx +33 -0
- package/src/components/app/EditorLoader.tsx +89 -0
- package/src/components/editor/ActionPalette.tsx +79 -0
- package/src/components/editor/JsonEditorPane.tsx +71 -0
- package/src/components/editor/ResultsPane.tsx +641 -0
- package/src/components/editor/actionCatalog.ts +23 -0
- package/src/components/settings/AgentAiPanel.tsx +105 -0
- package/src/components/settings/ApiKeyPanel.tsx +68 -0
- package/src/components/settings/CookiesPanel.tsx +154 -0
- package/src/components/settings/LayoutPanel.tsx +46 -0
- package/src/components/settings/ScreenshotsPanel.tsx +64 -0
- package/src/components/settings/SettingsHeader.tsx +28 -0
- package/src/components/settings/StoragePanel.tsx +35 -0
- package/src/index.css +287 -0
- package/src/main.tsx +13 -0
- package/src/types.ts +114 -0
- package/src/utils/syntaxHighlight.ts +140 -0
- package/start-vnc.sh +52 -0
- package/tailwind.config.js +22 -0
- package/tsconfig.json +39 -0
- package/tsconfig.node.json +12 -0
- package/vite.config.mts +27 -0
package/.dockerignore
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: Publish Docker Image
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ['main', 'beta']
|
|
6
|
+
tags: ['v*']
|
|
7
|
+
|
|
8
|
+
env:
|
|
9
|
+
GH_REGISTRY: ghcr.io
|
|
10
|
+
D_HUB_REPO: mnemosyneai/doppelganger
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build-and-push:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
packages: write
|
|
18
|
+
env:
|
|
19
|
+
D_HUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
20
|
+
D_HUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME || vars.DOCKERHUB_USERNAME }}
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout repository
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Log in to GHCR
|
|
27
|
+
uses: docker/login-action@v3
|
|
28
|
+
with:
|
|
29
|
+
registry: ${{ env.GH_REGISTRY }}
|
|
30
|
+
username: ${{ github.actor }}
|
|
31
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
32
|
+
|
|
33
|
+
- name: Log in to Docker Hub
|
|
34
|
+
if: env.D_HUB_TOKEN != ''
|
|
35
|
+
uses: docker/login-action@v3
|
|
36
|
+
with:
|
|
37
|
+
username: ${{ env.D_HUB_USERNAME }}
|
|
38
|
+
password: ${{ env.D_HUB_TOKEN }}
|
|
39
|
+
|
|
40
|
+
# Build tags dynamically
|
|
41
|
+
- name: Extract metadata (tags, labels) for Docker
|
|
42
|
+
id: meta
|
|
43
|
+
uses: docker/metadata-action@v5
|
|
44
|
+
with:
|
|
45
|
+
images: |
|
|
46
|
+
ghcr.io/${{ github.repository }}
|
|
47
|
+
${{ env.D_HUB_TOKEN != '' && env.D_HUB_REPO || '' }}
|
|
48
|
+
tags: |
|
|
49
|
+
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
|
|
50
|
+
type=raw,value=beta,enable=${{ github.ref == 'refs/heads/beta' }}
|
|
51
|
+
type=semver,pattern={{version}}
|
|
52
|
+
|
|
53
|
+
- name: Build and push Docker image
|
|
54
|
+
uses: docker/build-push-action@v5
|
|
55
|
+
with:
|
|
56
|
+
context: .
|
|
57
|
+
push: true
|
|
58
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
59
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
This project is committed to providing a welcoming, safe, and professional environment for everyone.
|
|
4
|
+
|
|
5
|
+
## Our Standards
|
|
6
|
+
We expect participants to:
|
|
7
|
+
- Be respectful and considerate in language and actions.
|
|
8
|
+
- Assume good intent and collaborate constructively.
|
|
9
|
+
- Focus on technical merit and helpful feedback.
|
|
10
|
+
- Respect privacy and avoid sharing personal data.
|
|
11
|
+
|
|
12
|
+
Unacceptable behavior includes:
|
|
13
|
+
- Harassment, discrimination, or abusive language.
|
|
14
|
+
- Trolling, spamming, or deliberate disruption.
|
|
15
|
+
- Doxing or sharing private information.
|
|
16
|
+
|
|
17
|
+
## Scope
|
|
18
|
+
This Code of Conduct applies to all project spaces, including issues, pull requests, discussions, and community channels.
|
|
19
|
+
|
|
20
|
+
## Reporting
|
|
21
|
+
If you experience or witness unacceptable behavior, report it to the project maintainers.
|
|
22
|
+
Include as much detail as possible so we can address the issue responsibly.
|
|
23
|
+
|
|
24
|
+
## Enforcement
|
|
25
|
+
The maintainers may take any action they deem appropriate, including warnings, temporary bans, or permanent removal from project spaces.
|
|
26
|
+
|
|
27
|
+
## Acknowledgment
|
|
28
|
+
This Code of Conduct is adapted from common open source community standards.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in contributing to Mnemosyne Doppelganger. This guide explains how to propose changes safely and efficiently.
|
|
4
|
+
|
|
5
|
+
## Ways to Contribute
|
|
6
|
+
- Report bugs with clear reproduction steps
|
|
7
|
+
- Suggest improvements or UX refinements
|
|
8
|
+
- Submit fixes or new features
|
|
9
|
+
- Improve documentation and examples
|
|
10
|
+
|
|
11
|
+
## Before You Start
|
|
12
|
+
- Check existing issues and discussions to avoid duplicates.
|
|
13
|
+
- Keep changes focused and small when possible.
|
|
14
|
+
- For larger changes, open an issue first to align on approach.
|
|
15
|
+
|
|
16
|
+
## Development Setup
|
|
17
|
+
```bash
|
|
18
|
+
npm install
|
|
19
|
+
npm run build
|
|
20
|
+
npm run start
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If using dev mode, ensure the frontend and backend ports match your proxy configuration.
|
|
24
|
+
|
|
25
|
+
## Coding Guidelines
|
|
26
|
+
- Prefer clear, readable code over cleverness.
|
|
27
|
+
- Keep UI changes consistent with the existing style.
|
|
28
|
+
- Avoid adding heavy dependencies unless necessary.
|
|
29
|
+
- Use ASCII characters in source files unless there is a clear reason.
|
|
30
|
+
|
|
31
|
+
## Pull Requests
|
|
32
|
+
Include:
|
|
33
|
+
- A short summary of what changed and why
|
|
34
|
+
- Screenshots or GIFs for UI changes
|
|
35
|
+
- Notes about testing performed
|
|
36
|
+
|
|
37
|
+
## Security and Responsible Use
|
|
38
|
+
- Do not include credentials or private data in issues or PRs.
|
|
39
|
+
- Respect the project license restrictions for commercial use.
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
By contributing, you agree that your contributions are licensed under the project license in `LICENSE`.
|
package/Dockerfile
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
FROM node:22-bullseye AS build
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
|
|
5
|
+
# Install deps (include dev deps for build)
|
|
6
|
+
COPY package*.json ./
|
|
7
|
+
RUN npm ci --include=dev
|
|
8
|
+
|
|
9
|
+
# Build frontend
|
|
10
|
+
COPY . .
|
|
11
|
+
RUN npm run build
|
|
12
|
+
|
|
13
|
+
FROM mcr.microsoft.com/playwright:v1.40.0-focal AS runtime
|
|
14
|
+
|
|
15
|
+
WORKDIR /app
|
|
16
|
+
|
|
17
|
+
# Install VNC + Xvfb for headful sessions in Docker
|
|
18
|
+
RUN apt-get update \
|
|
19
|
+
&& apt-get install -y --no-install-recommends \
|
|
20
|
+
xvfb \
|
|
21
|
+
x11vnc \
|
|
22
|
+
novnc \
|
|
23
|
+
websockify \
|
|
24
|
+
curl \
|
|
25
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
26
|
+
|
|
27
|
+
# Install production deps only
|
|
28
|
+
COPY package*.json ./
|
|
29
|
+
RUN npm ci --omit=dev
|
|
30
|
+
|
|
31
|
+
# Ensure Playwright browsers + OS deps are available
|
|
32
|
+
RUN npx playwright install --with-deps chromium chrome firefox
|
|
33
|
+
|
|
34
|
+
# Copy server and built assets
|
|
35
|
+
COPY --from=build /app/dist /app/dist
|
|
36
|
+
COPY --from=build /app/public /app/public
|
|
37
|
+
COPY --from=build /app/*.js /app/
|
|
38
|
+
COPY --from=build /app/start-vnc.sh /app/start-vnc.sh
|
|
39
|
+
|
|
40
|
+
EXPOSE 11345
|
|
41
|
+
EXPOSE 54311
|
|
42
|
+
ENV NODE_ENV=production
|
|
43
|
+
|
|
44
|
+
CMD ["bash", "/app/start-vnc.sh"]
|
package/LICENSE
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
SUSTAINABLE USE LICENSE (SUL) v1.0
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025
|
|
4
|
+
|
|
5
|
+
This License governs use of the software and associated documentation (the "Software").
|
|
6
|
+
By using, copying, modifying, or distributing the Software, you agree to all terms below.
|
|
7
|
+
|
|
8
|
+
1. Definitions
|
|
9
|
+
1.1 "Software" means the source code, object code, binaries, and documentation.
|
|
10
|
+
1.2 "You" means any individual or entity exercising rights under this License.
|
|
11
|
+
1.3 "Non-Commercial" means not primarily intended for or directed toward commercial
|
|
12
|
+
advantage or monetary compensation.
|
|
13
|
+
1.4 "Hosted Service" means making the Software or any portion of its functionality
|
|
14
|
+
available to third parties over a network, including SaaS, managed services,
|
|
15
|
+
platform services, or public API offerings.
|
|
16
|
+
1.5 "Derivative Work" means any modification, adaptation, or other work based on
|
|
17
|
+
the Software.
|
|
18
|
+
1.6 "Distribution" means providing the Software to any third party by any means,
|
|
19
|
+
including source code, binaries, containers, or images.
|
|
20
|
+
1.7 "Competing Product" means a product or service that provides materially
|
|
21
|
+
similar functionality to the Software.
|
|
22
|
+
1.8 "Author(s)" means the copyright holder(s) of the Software.
|
|
23
|
+
|
|
24
|
+
2. Grant of Rights
|
|
25
|
+
2.1 You may read, inspect, and modify the Software for personal, internal, or
|
|
26
|
+
Non-Commercial use.
|
|
27
|
+
2.2 You may run the Software on your own machines or infrastructure.
|
|
28
|
+
2.3 You may create and share community tutorials, examples, and presets.
|
|
29
|
+
2.4 You may modify the Software for personal automation, data extraction, or
|
|
30
|
+
experimentation.
|
|
31
|
+
2.5 You may share patches or snippets for Non-Commercial purposes, provided you
|
|
32
|
+
include required attribution.
|
|
33
|
+
|
|
34
|
+
3. Restrictions on Use
|
|
35
|
+
3.1 You may not offer the Software as a Hosted Service.
|
|
36
|
+
3.2 You may not redistribute the Software for commercial hosting or for
|
|
37
|
+
Competing Products.
|
|
38
|
+
3.3 You may not sell, sublicense, rent, lease, or commercially exploit the
|
|
39
|
+
Software as a standalone product or as part of any paid service.
|
|
40
|
+
3.4 You may not use the Software in a manner that violates applicable law or
|
|
41
|
+
third-party terms, including terms of websites or services you interact with.
|
|
42
|
+
3.5 You may not remove, alter, or obscure any copyright, license, or attribution
|
|
43
|
+
notices.
|
|
44
|
+
3.6 You may not imply endorsement, sponsorship, or affiliation by the Author(s)
|
|
45
|
+
without prior written permission.
|
|
46
|
+
3.7 You may not circumvent technological restrictions or access controls in
|
|
47
|
+
violation of applicable law.
|
|
48
|
+
|
|
49
|
+
4. Redistribution and Attribution
|
|
50
|
+
4.1 Any Distribution of source code or Derivative Works must retain this License
|
|
51
|
+
and all notices.
|
|
52
|
+
4.2 If you redistribute source code that includes any part of the Software and
|
|
53
|
+
the redistribution is not a Hosted Service, you must credit the Author(s)
|
|
54
|
+
prominently in the source and in accompanying documentation.
|
|
55
|
+
4.3 You may not impose additional restrictions that conflict with this License.
|
|
56
|
+
4.4 Distribution of binaries or compiled artifacts is prohibited unless expressly
|
|
57
|
+
permitted in writing by the Author(s).
|
|
58
|
+
4.5 Public repositories containing the Software must retain this License file.
|
|
59
|
+
|
|
60
|
+
5. Ownership and IP
|
|
61
|
+
5.1 The Software is licensed, not sold.
|
|
62
|
+
5.2 Title, ownership, and intellectual property rights in the Software remain
|
|
63
|
+
with the Author(s).
|
|
64
|
+
5.3 This License does not grant rights in any trademarks, logos, or branding.
|
|
65
|
+
|
|
66
|
+
6. Compliance and Lawful Use
|
|
67
|
+
6.1 You are solely responsible for your use of the Software and compliance with
|
|
68
|
+
all applicable laws, regulations, and third-party terms.
|
|
69
|
+
6.2 The Software does not grant any right to access systems, data, or content
|
|
70
|
+
without permission.
|
|
71
|
+
6.3 You must not use the Software for unlawful, harmful, or unauthorized
|
|
72
|
+
activities.
|
|
73
|
+
6.4 You are solely responsible for obtaining any required permissions, consents,
|
|
74
|
+
or licenses.
|
|
75
|
+
6.5 You bear all responsibility for the accuracy, integrity, and legality of
|
|
76
|
+
any data processed or collected using the Software.
|
|
77
|
+
|
|
78
|
+
7. Security and Misuse
|
|
79
|
+
7.1 The Software may be used for automation, testing, or data extraction; such
|
|
80
|
+
use is at your own risk.
|
|
81
|
+
7.2 You are responsible for securing your systems, credentials, and any data
|
|
82
|
+
generated or stored by the Software.
|
|
83
|
+
7.3 The Author(s) do not monitor, control, or endorse your usage.
|
|
84
|
+
7.4 You agree to indemnify and hold harmless the Author(s) against any claims,
|
|
85
|
+
damages, losses, or liabilities arising from your use of the Software.
|
|
86
|
+
|
|
87
|
+
8. No Warranty
|
|
88
|
+
8.1 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
89
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
90
|
+
FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
|
|
91
|
+
8.2 The Author(s) make no representations about accuracy, reliability, or
|
|
92
|
+
availability of the Software.
|
|
93
|
+
8.3 You assume all risk for use of the Software.
|
|
94
|
+
|
|
95
|
+
9. Limitation of Liability
|
|
96
|
+
9.1 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
97
|
+
DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR
|
|
98
|
+
OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
99
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
100
|
+
9.2 The foregoing limitation applies even if the Author(s) have been advised of
|
|
101
|
+
the possibility of such damages.
|
|
102
|
+
9.3 In jurisdictions that do not allow limitation of liability, liability is
|
|
103
|
+
limited to the maximum extent permitted by law.
|
|
104
|
+
|
|
105
|
+
10. Third-Party Components
|
|
106
|
+
10.1 The Software may include or depend on third-party libraries or services.
|
|
107
|
+
10.2 Those components are subject to their own licenses and terms.
|
|
108
|
+
10.3 You are responsible for compliance with any third-party requirements.
|
|
109
|
+
|
|
110
|
+
11. Privacy and Data
|
|
111
|
+
11.1 You are responsible for handling personal data lawfully and securely.
|
|
112
|
+
11.2 The Author(s) do not collect, transmit, or store your data unless you
|
|
113
|
+
explicitly configure the Software to do so.
|
|
114
|
+
11.3 You are responsible for any disclosures or notices required by law.
|
|
115
|
+
|
|
116
|
+
12. Export and Sanctions
|
|
117
|
+
12.1 You must comply with all applicable export control and sanctions laws.
|
|
118
|
+
12.2 You may not use or export the Software in violation of such laws.
|
|
119
|
+
|
|
120
|
+
13. Commercial Licensing
|
|
121
|
+
13.1 This License does not grant any commercial rights beyond those expressly
|
|
122
|
+
permitted.
|
|
123
|
+
13.2 The Author(s) reserve the right to offer separate commercial licenses,
|
|
124
|
+
Hosted Services, or enterprise features at their discretion.
|
|
125
|
+
13.3 If you seek commercial rights, you must obtain a separate written license.
|
|
126
|
+
|
|
127
|
+
14. Feedback
|
|
128
|
+
14.1 You may provide feedback, suggestions, or improvements.
|
|
129
|
+
14.2 You grant the Author(s) a perpetual, irrevocable, worldwide, royalty-free
|
|
130
|
+
license to use, modify, and incorporate feedback into the Software.
|
|
131
|
+
|
|
132
|
+
15. Termination
|
|
133
|
+
15.1 Any breach of this License automatically terminates your rights to use the
|
|
134
|
+
Software.
|
|
135
|
+
15.2 Upon termination, you must cease all use and delete all copies in your
|
|
136
|
+
possession or control.
|
|
137
|
+
15.3 Sections that by their nature should survive termination shall survive,
|
|
138
|
+
including Sections 5 through 15.
|
|
139
|
+
|
|
140
|
+
16. Notice of Violations
|
|
141
|
+
16.1 The Author(s) may enforce this License at their discretion.
|
|
142
|
+
16.2 Failure to enforce any provision is not a waiver of future enforcement.
|
|
143
|
+
|
|
144
|
+
17. Severability
|
|
145
|
+
17.1 If any provision is held to be unenforceable, the remaining provisions
|
|
146
|
+
remain in full force and effect.
|
|
147
|
+
|
|
148
|
+
18. Entire Agreement
|
|
149
|
+
18.1 This License constitutes the entire agreement regarding the Software and
|
|
150
|
+
supersedes prior agreements on this subject.
|
|
151
|
+
|
|
152
|
+
19. Changes to License
|
|
153
|
+
19.1 The Author(s) may publish updated versions of this License.
|
|
154
|
+
19.2 Continued use of the Software after an updated License is published
|
|
155
|
+
constitutes acceptance of the updated terms.
|
|
156
|
+
|
|
157
|
+
20. Contact
|
|
158
|
+
20.1 For commercial licensing inquiries or permissions, contact the Author(s)
|
|
159
|
+
through the official project channels.
|
|
160
|
+
|
|
161
|
+
21. Third-Party Components
|
|
162
|
+
21.1 All third party components incorporated into the Software are licensed
|
|
163
|
+
under the original license provided by the owner of the applicable component.
|
package/README.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Doppelganger
|
|
2
|
+
|
|
3
|
+
[](https://hub.docker.com/r/mnemosyneai/doppelganger)
|
|
4
|
+
[](#getting-started)
|
|
5
|
+
|
|
6
|
+
Doppelganger is a self-hosted, developer-focused browser automation and extraction tool. It runs locally via Docker and provides a DIY workflow for building automation tasks with blocks and optional JavaScript customization.
|
|
7
|
+
|
|
8
|
+
This project is designed for local, controlled use cases. It does not claim to bypass protections and does not encourage unlawful activity.
|
|
9
|
+
|
|
10
|
+
## Getting Started (Docker)
|
|
11
|
+
|
|
12
|
+
### Requirements
|
|
13
|
+
- Docker Desktop or Docker Engine
|
|
14
|
+
- x86_64 or ARM64 host
|
|
15
|
+
- 4GB+ RAM recommended
|
|
16
|
+
|
|
17
|
+
### Pull the Image
|
|
18
|
+
```bash
|
|
19
|
+
docker pull mnemosyneai/doppelganger
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Run the Container
|
|
23
|
+
```bash
|
|
24
|
+
docker run -d \
|
|
25
|
+
--name doppelganger \
|
|
26
|
+
-p 11345:11345 \
|
|
27
|
+
-e SESSION_SECRET=change_me_to_a_long_random_value \
|
|
28
|
+
-v $(pwd)/data:/app/data \
|
|
29
|
+
-v $(pwd)/public:/app/public \
|
|
30
|
+
-v $(pwd)/storage_state.json:/app/storage_state.json \
|
|
31
|
+
mnemosyneai/doppelganger
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Open the dashboard at:
|
|
35
|
+
```
|
|
36
|
+
http://localhost:11345
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Session Secret
|
|
40
|
+
Set a strong, unique secret via `SESSION_SECRET` before starting the container.
|
|
41
|
+
|
|
42
|
+
Example:
|
|
43
|
+
```bash
|
|
44
|
+
export SESSION_SECRET="$(node -e 'console.log(require("crypto").randomBytes(32).toString("hex"))')"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Update to Latest
|
|
48
|
+
```bash
|
|
49
|
+
docker pull mnemosyneai/doppelganger
|
|
50
|
+
docker stop doppelganger
|
|
51
|
+
docker rm doppelganger
|
|
52
|
+
docker run -d \
|
|
53
|
+
--name doppelganger \
|
|
54
|
+
-p 11345:11345 \
|
|
55
|
+
-e SESSION_SECRET=change_me_to_a_long_random_value \
|
|
56
|
+
-v $(pwd)/data:/app/data \
|
|
57
|
+
-v $(pwd)/public:/app/public \
|
|
58
|
+
-v $(pwd)/storage_state.json:/app/storage_state.json \
|
|
59
|
+
mnemosyneai/doppelganger
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Usage
|
|
63
|
+
|
|
64
|
+
### Open the Dashboard
|
|
65
|
+
Navigate to:
|
|
66
|
+
```
|
|
67
|
+
http://localhost:11345
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Create a Task (Block-Based)
|
|
71
|
+
1. Click **New Task**
|
|
72
|
+
2. Choose a mode (Scrape, Agent, Headful)
|
|
73
|
+
3. Add action blocks (click, type, hover, wait, scroll, press, javascript)
|
|
74
|
+
4. Configure variables and selectors
|
|
75
|
+
5. Save and run
|
|
76
|
+
|
|
77
|
+
### Example Workflow (Safe Demo)
|
|
78
|
+
Goal: Load a public page, wait, and extract a title.
|
|
79
|
+
1. Create a new task
|
|
80
|
+
2. Set URL to `https://example.com`
|
|
81
|
+
3. Add a **wait** block (2 seconds)
|
|
82
|
+
4. Add a **javascript** block:
|
|
83
|
+
```js
|
|
84
|
+
return document.title;
|
|
85
|
+
```
|
|
86
|
+
5. Run the task and view the output
|
|
87
|
+
|
|
88
|
+
### JSON Export
|
|
89
|
+
In the task editor, open the JSON view and copy the task definition for reuse.
|
|
90
|
+
|
|
91
|
+
### JavaScript Blocks
|
|
92
|
+
JavaScript blocks allow custom extraction or page logic. Use them for:
|
|
93
|
+
- Parsing DOM elements
|
|
94
|
+
- Returning structured data
|
|
95
|
+
- Adding custom logic to actions
|
|
96
|
+
|
|
97
|
+
### Secure API Access
|
|
98
|
+
Tasks can be executed via HTTP requests using the API key. This enables secure, automated access from other services.
|
|
99
|
+
|
|
100
|
+
Key details:
|
|
101
|
+
- Endpoint: `POST /tasks/:id/api`
|
|
102
|
+
- Auth headers: `x-api-key: <key>` or `Authorization: Bearer <key>`
|
|
103
|
+
- Variables: send `variables` (or `taskVariables`) in the JSON body to override task variables
|
|
104
|
+
- API key: generate or set one in **Settings** → **API Key** (stored locally)
|
|
105
|
+
|
|
106
|
+
Example:
|
|
107
|
+
```bash
|
|
108
|
+
curl -X POST http://localhost:11345/tasks/task_123/api \
|
|
109
|
+
-H "Content-Type: application/json" \
|
|
110
|
+
-H "x-api-key: YOUR_API_KEY" \
|
|
111
|
+
-d "{\"variables\":{\"query\":\"example.com\"}}"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Community and Presets
|
|
115
|
+
Community-contributed presets or examples may be shared in the future.
|
|
116
|
+
- Use community content at your own risk
|
|
117
|
+
- The author is not responsible for community content
|
|
118
|
+
- Always use the tool safely and legally
|
|
119
|
+
|
|
120
|
+
## License
|
|
121
|
+
This project uses a Sustainable Use License (SUL). See `LICENSE`.
|
|
122
|
+
|
|
123
|
+
## Disclaimer
|
|
124
|
+
The software is provided "as-is" without warranty. You are solely responsible for:
|
|
125
|
+
- Your scripts and automation behavior
|
|
126
|
+
- The data you access or collect
|
|
127
|
+
- Any consequences of use
|
|
128
|
+
|
|
129
|
+
Do not use this tool in ways that violate laws or third-party terms.
|
|
130
|
+
|
|
131
|
+
## Links
|
|
132
|
+
- Homepage/Docs: https://doppelgangerdev.com
|
|
133
|
+
- Docker Hub: https://hub.docker.com/r/mnemosyneai/doppelganger
|
package/TERMS.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Terms of Service
|
|
2
|
+
|
|
3
|
+
By using Doppelganger, you agree to the terms below.
|
|
4
|
+
|
|
5
|
+
1. Responsibility
|
|
6
|
+
- You are solely responsible for your scripts, automation, and any consequences of use.
|
|
7
|
+
- You are responsible for complying with all applicable laws and third-party terms.
|
|
8
|
+
|
|
9
|
+
2. Prohibited Use
|
|
10
|
+
- You may not offer the software as a hosted service or SaaS product.
|
|
11
|
+
- You may not redistribute the software for commercial hosting or competing products.
|
|
12
|
+
- You may not sell or license the software as a standalone product or as part of any paid service.
|
|
13
|
+
|
|
14
|
+
3. No Warranty
|
|
15
|
+
- The software is provided "as-is" without warranty of any kind, express or implied.
|
|
16
|
+
- The authors are not liable for damages, misuse, or data loss.
|