• This repository has been archived on 19/Nov/2021
  • Stars
    star
    456
  • Rank 95,356 (Top 2 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 13 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DuckDuckGo Community Platform

DuckDuckGo - Community Platform

This is the source code for the DuckDuckGo Community Platform at duck.co

Requirements / Installation

The DuckDuckGo Community Platform is built on Perl, Catalyst, DBIx::Class, Text::Xslate and Dancer2.

Requires perl 5.16.3 (or higher) and:

  • cpanm (local::lib and/or perlbrew recommended)
  • gcc toolchain (gcc, make, lib headers)
  • git
  • libcurl
  • imagemagick
  • postgresql (recommended, though you may get away with mysql or sqlite for now)

To install these on Debian / Ubuntu:

  apt-get install cpanm build-essential libgd2-xpm-dev libssl-dev git libcurl4-gnutls-dev libxml2-dev imagemagick perl-doc postgresql libpq-dev

To proceed with installation, you will also need Dist::Zilla

  cpanm -i Dist::Zilla

To install community-platform's Perl dependencies, go to its directory and run:

  dzil authordeps --missing | cpanm
  dzil listdeps --missing | grep -v abstract | cpanm

This will take some time. You can add --notest to the cpanm command to speed things up, but this may result in fires later.

Test Data

Before running the dev server, we need a database schema.

The default is to use SQLite if no DSN configuration environment variables are found, e.g.

  export DDGC_DB_DSN='dbi:Pg:database=ddgc';
  export DDGC_DB_USER='ddgc';
  export DDGC_DB_PASSWORD='yourdbpass';

To run the dev environment deployment script, your postgres user requires the following permissions:

  ALTER USER ddgc CREATEDB;
  ALTER USER ddgc LOGIN;

This script deploys the schema and populates it with a test / dev data set:

  script/ddgc_deploy_dev.pl

You can also roll over any existing schema with the --kill switch:

  script/ddgc_deploy_dev.pl --kill

For the flags to work, you need to generate their sprites. This process has to be repeated everytime the country flags are changed.

  script/ddgc_generate_flag_sprites.pl

Community platform's generated static files, media uploads, caches, duckpan packages etc. live in $HOME/ddgc/

Development

To launch the development web server:

script/ddgc_dev_server.sh

This, by default, launches a plack server bound to port 5001 with DBIC and Catalyst console debugging enabled with Plack debug panels in rendered output.

It watches the lib/ directory and restarts if there are any changes written. It supports the following options:

  • -p - Set port to bind to
  • -m - Use a debug mailer on localhost:1025 (python -m smtpd -n -c DebuggingServer localhost:1025)
  • -n - Don't render Plack debug panels (useful for frontend work)

Front end elements (js, css...) in src/ are managed by node.js / grunt.

To launch a task to rebuild static files when they change, use

grunt watch

User Accounts

The following accounts are created by ddgc_deploy_dev.pl:

  • testone An admin, who is native German but also speaks English.

  • testtwo A normal user who speaks Spanish with public profile.

  • testthree A translation manager who speaks English, Arabic, and German.

  • testfour An admin, who speaks German, Spanish, and English.

  • testfive A normal user without public profile, who speaks Russian and English.

  • Additionally there are also test1 to test40 all without any setup.

Any random password will suffice, as a separate service is used to provide authentication in production.

License

This software is licensed under Perl 5 dual license: either GPLv1 or later, or, at users' choice, Artistic 1.0. We welcome contributions to this software under the same licensing terms.

Third party credits

The project is built using other software packages and creative content:

More Repositories

1

Android

DuckDuckGo Android App
Kotlin
3,758
star
2

iOS

DuckDuckGo iOS Application
HTML
1,812
star
3

duckduckgo

DuckDuckGo Instant Answer Infrastructure
Perl
1,759
star
4

tracker-radar

Data set of top third party web domains with rich metadata about them
JavaScript
1,502
star
5

duckduckgo-privacy-extension

DuckDuckGo Privacy Essentials browser extension for Firefox, Chrome.
JavaScript
1,242
star
6

zeroclickinfo-goodies

DuckDuckGo Instant Answers based on Perl & JavaScript
Perl
976
star
7

zeroclickinfo-spice

DuckDuckGo Instant Answers based on JavaScript (JSON) APIs
JavaScript
548
star
8

android-search-and-stories

DuckDuckGo Search & Stories for Android
Java
425
star
9

zeroclickinfo-fathead

DuckDuckGo Instant Answers based on keyword data files
Python
317
star
10

cpp-libface

Fastest auto-complete in the east
C++
259
star
11

macos-browser

DuckDuckGo macOS Browser
Swift
232
star
12

tracker-radar-detector

Code used to build a Tracker Radar data set from raw crawl data.
JavaScript
192
star
13

duckduckgo-help-pages

DuckDuckGo Help Pages
SCSS
187
star
14

ios-search-and-stories

DuckDuckGo Search & Stories for iOS
Objective-C
176
star
15

tracker-blocklists

Web tracker blocklists used by DuckDuckGo apps and extensions.
JavaScript
147
star
16

duckduckcrawl

Distributed crawling prototype for DuckDuckGO
Python
143
star
17

smarter-encryption

Perl
142
star
18

tracker-radar-collector

πŸ•Έ Modular, multithreaded, puppeteer-based crawler
JavaScript
133
star
19

privacy-configuration

πŸŽ› Configuration files used by DuckDuckGo's apps and extensions to control which privacy protections are enabled.
JavaScript
105
star
20

privacy-for-safari

DuckDuckGo Privacy for Safari
Swift
99
star
21

duckduckgo-locales

Translation files for duckduckgo.com
Perl
96
star
22

zeroclickinfo-longtail

DuckDuckGo Instant Answers based on full-text data
Python
86
star
23

firefox-zeroclickinfo

Firefox Add-on using the DuckDuckGo Zero-click Info API
JavaScript
85
star
24

duckduckhack-docs

DuckDuckHack Instant Answer documentation for developers
78
star
25

filter-bubble-study

Python scripts used to analyse Google search results for the DuckDuckGo 2018 filter bubble study.
Python
75
star
26

autoconsent

TypeScript
74
star
27

chrome-zeroclickinfo

Chrome Extension using the DuckDuckGo Zero-click Info API
JavaScript
72
star
28

privacy-test-pages

πŸ›‘ Collection of pages for testing various privacy and security features of browsers and browser extensions.
HTML
69
star
29

tracker-radar-wiki

Generation scripts and source for Tracker Radar Wiki
JavaScript
55
star
30

p5-app-duckpan

DuckDuckHack OpenSource Development Application
Perl
53
star
31

duckduckgo-publisher

Generation of the static files of DuckDuckGo and its microsites.
Perl
52
star
32

BrowserServicesKit

Swift
46
star
33

duckduckgo-documentation

Deprecated - OLD - See Below
44
star
34

php5-duckduckgo

PHP5 library for the DuckDuckGo Zero-click Info API
PHP
42
star
35

api

Zero-click API Libraries
JavaScript
41
star
36

duckduckgo-styles

Common styling elements for all DuckDuckGo properties
SCSS
39
star
37

content-scope-scripts

Content Scope Scripts handles injecting in DOM modifications in a browser context; it's a cross platform solution that requires some minimal platform hooks.
JavaScript
38
star
38

duckduckhack.com

This repo contains the static content used to build DuckDuckHack.com
CSS
28
star
39

duckduckgo-utils

JS utility methods used by DuckDuckGo
JavaScript
26
star
40

duckduckgo-autofill

HTML
25
star
41

replaceawordinafamousquotewithduck

Powering the #replaceawordinafamousquotewithduck micro-site
Perl
25
star
42

bloom_cpp

C++
24
star
43

ddg-screen-diff

Visual regression tool for DuckDuckGo
JavaScript
24
star
44

safari-zeroclickinfo

Safari extension using the DuckDuckGo Zero-click Info API
HTML
20
star
45

chrome-filterbubble

Chrome extension which shows you what you are missing on Google.
JavaScript
20
star
46

duckduckgo-answerbar-templates

Templates used in DuckDuckGo's Instant Answers
HTML
20
star
47

tracker-surrogates

πŸ’‰ Surrogates are small scripts that our apps and extensions serve in place of trackers that cause site breakage when blocked.
JavaScript
19
star
48

litestrap

Litestrap framework used by DuckDuckGo
CSS
19
star
49

duckduckgo-translate

DuckDuckGo translation library
JavaScript
19
star
50

content-blocking-whitelist

Shell
17
star
51

opera-zeroclickinfo

ZeroClickInfo for Opera
JavaScript
16
star
52

duckduckgo-colors

CSS
14
star
53

duckduckgo-template-helpers

Template helpers used by DuckDuckGo
JavaScript
14
star
54

opera-speeddial

DuckDuckGo Opera speed dial extension
JavaScript
12
star
55

privacy-reference-tests

πŸ§ͺ Test metadata used by DuckDuckGo apps and extensions to verify implementation of privacy features
JavaScript
12
star
56

zeroclickinfo-goodie-qrcode

QRCode Goodie of DuckDuckGo
Perl
12
star
57

chrome-webstore

DuckDuckGo in the Chrome Webstore
Makefile
12
star
58

privacy-grade

JavaScript
12
star
59

p5-www-duckduckgo

Access to the DuckDuckGo APIs
Perl
12
star
60

DaxMailer

Subscriber and Bang submission handling
Perl
10
star
61

TrackerRadarKit

Swift
10
star
62

p5-duckpan-installer

DuckPAN Perl Installer
Perl
9
star
63

privacy-dashboard

JavaScript
9
star
64

duckpan-docker

A Dockerfile for installing DuckPAN.
Dockerfile
9
star
65

abp-filter-parser

JavaScript Adblock Plus filter parser for lists like EasyList
JavaScript
9
star
66

netguard

C
8
star
67

DuckDuckHack-APIs

duckduckhack.com APIs, services, web resources.
7
star
68

p5-app-duckduckgo-ui

Optional text UI for App::DuckDuckGo
Perl
7
star
69

zeroclickinfo-goodie-chords

Plugin for computing chords and scales
Perl 6
7
star
70

DuckDuckBox

A central repository for DuckDuckBox, that is being used in DuckDuckGo browser extensions
JavaScript
7
star
71

eslint-config-duckduckgo

JavaScript Style Guide
JavaScript
7
star
72

zeroclickinfo-goodie-spell

Spellcheck goodie using Aspell
Perl
7
star
73

content-blocking-lists

6
star
74

Launchpad

0-click results from Launchpad
Python
6
star
75

remote-messaging-config

5
star
76

mv3-compat-tests

JavaScript
5
star
77

wireguard-apple

Swift
5
star
78

p5-dist-zilla-plugin-uploadtoduckpan

Dist::Zilla Plugin to upload to our duckpan.org
Perl
5
star
79

windows-zeroclickinfo

Windows Application for checking DuckDuckGo ZeroClickInfo
JavaScript
5
star
80

ddg2dnr

Scripts to generate declarativeNetRequest rulesets for the DuckDuckGo browser extension. This now lives in the duckduckgo-privacy-extension repository, see link below.
JavaScript
5
star
81

ios-js-support

JavaScript
4
star
82

DesignResourcesKit

Swift
4
star
83

sync_crypto

C
4
star
84

community-platform-static

Shared static files of the community platform and related sites
CSS
4
star
85

danger-settings

TypeScript
4
star
86

pull-request-helper

A simple tool that builds a markdown checklist containing example queries for Instant Answers
JavaScript
3
star
87

content-scope-utils

JavaScript Modules for Native Apps and Extensions
JavaScript
3
star
88

smileys

Smileys used for 0-click info.
Python
3
star
89

p5-dzp-announcerelease

Announce new instant answer releases and its changes
Perl
3
star
90

zeroclickinfo-goodie-math

A DuckDuckGo goodie for rendering LaTeX math using MathJax
JavaScript
3
star
91

zeroclickinfo-goodie-isvalid

IsValid::JSON and IsValid::XML DuckDuckGo Goodies
Perl 6
3
star
92

BareBonesBrowser

vanilla webview browser for iOS/macOS
Swift
2
star
93

p5-dzp-automodulesharedirs

Automatically install sharedirs for modules
Perl
2
star
94

remote-feature-flagging-config

2
star
95

p5-dzp-iachangelog

Add an Instant Answer change log to a release
Perl
2
star
96

p5-dist-zilla-plugin-buildshareassets

Prepares files in instant answer share directories for production
Perl
2
star
97

p5-app-duckduckgo

Application to access the DuckDuckGo API
Perl
2
star
98

p5-dist-zilla-plugin-duckpanmeta

DistZilla plugin for gathering DuckPAN related (so far only DDG related) meta information
Perl
2
star
99

OpenSSL-XCFramework

Shell
1
star