Git Product home page Git Product logo

scard's Introduction

Scard

注意: 本專案已不再進行維護

本專為參考Dcard的社群論壇與交友平台,主功能如下:

  1. 帳號系統:個人帳號之建置、認證與個人資料填寫。
  2. 抽卡系統:每日進行不重複對象之抽卡配對,雙方送出交友邀請後可在聊天室對談互動。
  3. 文章系統:使用者可以發佈文章並在文章下留言、按讚、追蹤,並設有通知系統,隨時發送追蹤貼文的最新通知。

使用技術

  • Python Flask
  • RESTful API架構實踐專案功能
  • 支援Facebook / Google Login,並對直接註冊使用者進行email驗證
  • 結合Bootstrap完成網頁版面設置
  • 以原生Contenteditable實作文章編輯系統
  • 使用index加速MySQL查詢效率
  • 使用Redis存取個人資料快取與通知
  • 運用Multi-thread加速抽卡配對效率
  • 以S3儲存使用者上傳的圖片與大頭貼
  • 結合Socket.io + Redis pub/sub + ELB實踐多開機器情境的聊天 / 通知播送功能
  • 申請SSL憑證實踐HTTPS

系統架構圖

image

MySQL資料庫架構

image

功能介紹

瀏覽首頁

登入首頁後即可看到文章列表,並能點選進入不同的文章分頁。 image

登入/註冊

在登入/註冊頁面輸入帳號密碼,未註冊過的帳號會同時處理註冊與登入,已註冊過的帳號則會辨別帳號密碼是否正確。

image

帳戶功能

  • 使用者登入後若要編輯自我介紹、撰寫貼文,都要做基本資料的撰寫。

image

  • 以下分別呈現撰寫、瀏覽貼文頁面。

image

image

抽卡機制

  • 本網站採用與Dcard相同基礎的抽卡機制:每到午夜12點,符合抽卡資格者將會在抽卡頁面瀏覽到當天的Scard,已經抽過的卡將永遠不再被配對到。
  • 為增加配對效率,當抽卡人次多於1萬人時將使用muti-thread分為10條子執行緒進行,加速配對效率
  • 抽卡的配對在前一天的23:59進行,10萬人配對可在30秒內完成。使用者在午夜00:00:00即可看到當天配對的Scard資訊。
  • 三天沒有開啟Scard頁面者將暫時失去抽卡資格,直到使用者重新點開scard頁面,即會獲得隔天的抽卡機會(23:59後開卡者不算)。
  • 若兩人都送出交友邀請,兩人將成為卡友

image

聊天機制

  • 成為好友的兩人可以進行送信聊天,聊天以socket.io實作,好友的最新回應也會隨時更新,並調整好友欄呈現順序。

image

scard's People

Contributors

skysea04 avatar

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.