/docs

Primary LanguageJavaScript

Daily.dev Documentation

Development

git clone https://github.com/dailydotdev/docs.git

Step into the directory:

cd docs

Install the depndencies

npm i 

if you use yarn, you can alternatively just type 'yarn'

Run the local dev environment

npm run start

if you use yarn, you can use 'yarn start'

visit

http://localhost:3000

Deployment

Build the project

yarn build

Run the server

yarn serve

The server is available by default on port 3000

Deployment with Docker

From the folder where the docker-compose.yml file is located, type:

docker compose up --build

The server is available by default on port 3000

Test it

docker run -p 3000:3000 francescoxx/dailydev-docs:0.9.0
Daily Logo

Welcome to the daily.dev Documentation repository

The latest dev news delivered to your new tab ๐Ÿ‘ฉ๐Ÿฝโ€๐Ÿ’ป
Made with โค๏ธ by developers for developers

Chrome Web Store users Mozilla Web Store users Twitter Storybook

๐Ÿ—ž daily.dev

daily.dev is an open-source browser extension that helps developers stay updated with the latest programming news ๐Ÿ‘ฉโ€๐Ÿ’ป

It collects and ranks articles from hundreds of unique publications to help developers stay updated with the latest tech news. You can bookmark posts, sync your data across devices, and read later whenever you want. It works offline and has a progressive web app (PWA) for mobile.

At daily.dev we care about:

  • ๐ŸŒŸ Maintenance: We are working continuously to introduce new features, fix bugs, and improve user experience โ€” 40+ releases on average in a year.
  • โ™พ Being relevant: daily.dev's article feed is constantly updated. Discover brand-new content as soon as it is published.
  • ๐Ÿงต Open-source: daily.dev is completely open-source. We believe in transparency and giving back to the community, so we decided to publish the source code to GitHub. Suggest a feature, report a bug, or even contribute. Everyone is welcome!

daily.dev
๐Ÿ“บ Watch Intro Video โ†’

๐Ÿ“Œ Get daily.dev

daily.dev is currently available for Google Chrome, Microsoft Edge, and Firefox. There's also a progressive web app (PWA) for mobile devices. Get it now on:

Download for Chrome Download for Edge Download for Firefox Download for Mobile

๐Ÿ“ฏ Philosophy

We, as developers, spend a lot of time looking for valuable articles and blog posts. We believe that searching for content isn't a thing developers should do anymore. It's hard to catch up with all the latest happenings โ€” coz it's spread on so many blogs and consumes tons of time.

That's why we built daily.dev, to help you:

  • ๐Ÿ‘จโ€๐Ÿ’ป Stay up-to-date
  • ๐Ÿ•’ Save time
  • ๐Ÿ“ฐ Discover articles in one click

๐ŸŒฒ daily.dev Projects

daily.dev might look simple on the surface but actually, it is powered by a complex and robust system of different applications. It contains several services, some are big, others are micro and easy to maintain. Below is the list of different projects that we maintain under daily.dev.

๐Ÿ™Œ Community & Docs

  • daily - This is the repository you are currently at. It serves as a central place for all the projects. It contains documentation, community ideas, suggestions, and whatnot.

๐ŸŽจ Frontend

  • apps - Monorepo with all the frontend related projects since daily.dev 3.0. This includes both the extension and the webapp.

๐Ÿ— Backend

  • daily-api - A monolith API service, being slowly split apart to different services. It manages content-related data such as posts, feeds, tags, etc.
  • daily-gateway - API gateway which receives all traffic and forwards it to the relevant services after authenticating and authorizing the request.
  • daily-monetization - Serving ads from different providers including CodeFund, BuySellAds and self-hosted campaigns.
  • daily-scraper - Scraping webpages for relevant information.
  • daily-functions - Monorepo with Cloud Functions which mostly take care of ingesting new content but also web push and others.

๐Ÿ› Architecture

Daily architecture

๐Ÿ—‚ Tech Stack

Below is a list of technologies we use at daily.dev.

  • ๐ŸŽจ Frontend: Preact
  • ๐ŸŒณ Services: Node.js & Golang
  • โ˜๏ธ Cloud: Google Cloud Platform Pub/Sub | SQL | Serverless
  • โ™พ CI/CD: CircleCI
  • ๐ŸŽฉ Deployment: Pulumi
  • ๐ŸŽ› Data Feed: Superfeedr
  • ๐Ÿ“จ Email Service: SendGrid
  • ๐Ÿšจ Push Notifications: OneSignal

๐Ÿš€ Running daily.dev Locally

Let's setup daily.dev locally. First you need to setup the services required to run the daily.dev applications, then you can run the application you want. Follow up the setups below to quickly get started.

โš™๏ธ Setting Up Daily Services

โ†’ STEP #0

  • Go through the projects description and the architecture to familiarize yourself with the system and its components.
  • Make sure docker-compose is installed on your machine. Take a look at the official guide for installation. After installation, run the following command in your terminal for a double check.
docker-compose -v
# docker-compose version 1.29.2, build 5becea4c     // Expected result

โ†’ STEP #1

Clone the apps repo.

โ†’ STEP #2

Daily services are fully dockerized and publicly available on a Google Cloud Registry (GCR) repository. We are going to use them!

The first step is to pull and run the docker images, thanks to docker-compose network and environment variables are preconfigured and ready-to-go.

Navigate to the cloned repository and make sure Docker is running on your machine. After that run the following command to run all daily services:

docker-compose pull && docker-compose up

The command will take a while depending upon your internet speed.

โ†’ STEP #3

Now we need to apply the migrations on our databases so they will have the latest schema:

docker exec apps_daily-api_1 node ./node_modules/typeorm/cli.js migration:run

# ... // Expected result
# Migration PostToc1623847855158 has been executed successfully.
# query: COMMIT

docker exec apps_daily-gateway_1 yarn run db:migrate:latest

# Using environment: development   // Expected result
# Batch 1 run: 23 migrations
# Done in 1.57s.

โ†’ STEP #4

The last step is to populate your database using the seed data. All you need to do is, run the following command in your terminal:

docker exec apps_daily-api_1 node bin/import.js

# importing Source              // Expected result
# importing Post
# importing Keyword
# importing PostKeyword
# done

That's it! ๐Ÿฅ‚

Now you have all the required services running. Each project's repo explains what services are needed and how to get started with them.

Note that currently, not all services are ready (or needed) for local environment so Daily Redirector and Daily Monetization services are not available for you.

It means that if you click on an article you will get error 404 and that you will not see ads on your local environment.

๐ŸŽจ Setting Up Daily Apps

Now, let's quickly set up daily.dev apps.

โ†’ STEP #1

Run the following commands in your terminal to bootstrap.

Yes, we use lerna for this purpose.

npm i -g lerna
lerna bootstrap

# ...     // Expected result
# lerna success Bootstrapped 5 packages

โ†’ STEP #2

Go to packages/webapp in the apps folder. Run the following command to start the webapp in development mode. It will watch for all the file changes.

npm run dev

โ†’ STEP #3

Go to packages/extension in the apps folder. Run the following command to start the extension in development mode. It will watch for all the file changes and generate the output in dist folder.

npm run dev:chrome

โ†’ STEP #4

By now, you will have unpacked daily.dev extension in your dist folder. Follow the steps listed below to load the extension.

  1. Go to chrome://extensions path in your Chrome browser.
  2. Enable Developer mode from the top right section.
  3. Click on Load Unpack button and select your dist folder.

That's it! Your extension has been loaded in your browser. Happy hacking! โœŒ๏ธ

๐Ÿ™Œ Want to Contribute?

We are open to all kinds of contributions. If you want to:

  • ๐Ÿค” Suggest a feature
  • ๐Ÿ› Report an issue
  • ๐Ÿ“– Improve documentation
  • ๐Ÿ‘จโ€๐Ÿ’ป Contribute to the code

You are more than welcome. Before contributing, kindly check our guidelines.

๐Ÿค” FAQs

We have compiled a list of FAQs. You can find it here.

๐ŸŽฉ Core Team

Meet the core team of daily.dev:

Feel free to reach us out and say hi ๐Ÿ‘‹.

๐Ÿ’ฌ What Do You Think of daily.dev?

Twitter @dailydotdev  Tweet us @dailydotdev to share your thoughts and stay up-to-date.

Facebook @dailydotdev  Like us to know what's happening at daily.dev and share your reviews.

daily.dev at ProductHunt  Checkout our ProductHunt page and let us know what you think.

daily.dev Website  Visit our home for all useful links.

daily.dev at ChomeStore  See our Chrome Store page to grab the extension or share your feedback.

daily.dev at EdgeAddons  Check us out on Microsoft Edge Addons and let us know your thoughts.

daily.dev at Firefox  Check our Firefox Add-on and share your thoughts.

๐Ÿ“‘ License

Licensed under AGPL-3.0.