Giter Site home page Giter Site logo

codedaily-v3's Introduction

Codedaily Build Status

Live demo: https://news.kipalog.com/

Setup

Install Rust

Required Rust version: nightly. We hate comfort zone. Set rust nightly run command: rustup default nightly

Follow instructions install rust

DB

Use Postgres

  • Create your db name and your credentials
  • Put theme into url like: postgres://username:password@localhost/database_name
  • Add url into .env file

Config DB

Copy file .env.example to .env and add your config db url.

Pull all git submodules

git submodule update --init --recursive

Install

1. Install Diesel
cargo install diesel_cli --no-default-features --features=postgres

2. Migrate DB
diesel migration run

3. Install deps
cargo install

Run local development server

cargo run --bin server

Build release

cargo build --release

Setup frontend

Use yarn

Run command: yarn install && yarn watch

Deploy

Config cronjob

In command line run: crontab -e and add job 0 */1 * * * /path/to/bin/crawler.

This job will run pass every hour at minute 0.

LICENSE

MIT & APACHE-2

codedaily-v3's People

Contributors

codeaholicguy avatar conanak99 avatar huytd avatar ldhnam avatar mdevlamynck avatar phsym avatar qcam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

codedaily-v3's Issues

Hide duplicated post across sites

Some blogger like this guy often duplicate his post to many sites like Kipalog, TheFullSnack,... (what a d*ck!)

We need to come up with the solution that we could filter out the duplicated post, to make sure one article will not be displayed twice on the newsfeed, even if it's from different sites.

User Role system

We now have user system.

The next goal would be the Role system.

There will be 3 main roles:

  1. Administartor
  2. Moderators
  3. Users

This will include some database change but must not modify any exist table. Mostly backend work is needed for this feature.

Write unit test

Hohoho! Welcome, Hacktoberfesters!

I know you will be here so I prepared some easy stuff for you. Enjoy it.

This project is slowly growing big and we're facing the death threat, we have no unit test!

This is a gold mine! You can open as many pull request as you can to cover all of the code we have in unit tests. But remember, each pull request must be done for a whole module (for example, one model per pull request is ok, but if you open 4 pull requests for 4 random function, it will be rejected right away).

Good luck guys!

Modularize the Models

So, we have some models like Users, Auth, Sites, Links.

All of them are now living in models.rs, it's a good time to modularize them so each of them will have their own file.

Feature: Text post

Let the user have the ability to submit a text post.

The feature will need to be implemented in both frontend and backend.

The posts will be sorted by time (as of now), later on, we will have the ranking system based on #9

To prevent spamming, text post feature will only be unlocked for users who has commented 20 (or so) "good comment" (280 characters and up, that's the sign of not spammer, and a debating comments, something like that)

P/S: Don't ask me about the number (280)

RSS feed of a RSS feed

I know this is stupid and heartbroken, but somebody didn't like the UI that I've made for hours (0.2 hours exactly).

So, they wish to have the RSS feed to read on their own reader.

Why not? Not a bad idea, right?

So, it should be https://news.kipalog.com/rss and https://news.kipalog.com/rss?filter=top in the future.

Kinda ez, right? :D

www/build.js

I'm not sure if it is conventionally a good practice to keep build artifacts like www/build.js in the repo.

Display post's featured photo on the news feed

Some RSS feed has featured photo of the post included. And there are some requests to have the newsfeed displayed with those images.

We need to consider the case that a RSS feed does not provide any images as well.

The work need to be done for both server and crawler, hence, two isolated pull requests is recommended.

Display site name instead of domain name

Somebody not hosting RSS feeds from their own site, they use 3rd party like Feedproxy or Feedburner or whatever they found.

Since we already have the site name field in sites table, we could use this field to display instead of parsing the first part of URL.

There are many approach to solve this problem, let's discuss and propose your solution before we jump to the real implementation.

Implement comment feature

We have authentication and user system up and running.

The next step will be the ability for user to comment on our site.

This will be a big issue, mostly for backend and frontend, so it's recommended if you could have 2 different pull request for each of them.

Take a look at the docs folder for the desired expectation of the commenting system.

Admin Dashboard - Post management

This will be the first feature for the Admin Dashboard.

There are a lot of incoming request for the Admin Dashboard but let's keep it as simple as possible for now.

  1. Only administrator and moderators will have access to the dashboard, other users will get a 404 error.
  2. The logged in administrator/moderator will be able to delete a post from newsfeed.

Both backend and frontend will need to be done for this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.