This is my final evaluation of Google Summer of Code 2021.
I worked in Casbin this summer, and my job is to write code for Casdoor and Casnode. Click the link to read My Proposal of Google Summer of Code 2021.
The first part of this report is a brief summary of my work. For detailed contributions, please read the summary of pull requests below.
Summary
Here are some big features I implemented for Casdoor and Casnode. In addition, I also fixed bugs for both of them.
Casdoor
Casdoor is a Single-Sign-On platform based on OAuth 2.0 / OIDC. It can also serve as a service provider (you can use Casdoor to send Emails, upload files, set an avatar). My work during Google Summer of Code is to implement some of these functions, and add new features to it.
Support avatar tailoring uploading: This is the first contribution I made to Casbin community. I spent almost a week learning the file structure of Casdoor, Golang and React, then I talked to my mentor about the details and the front end UI. It was really excited to see the PR was merged in the end. After this, I became familiar with the process of making a contribution to the community, so things became easy after that.
go-sms-sender and the verification code: There are many SMS providers in mainland China. Each of them has a different API and SDK. So it is not easy to adapt all of them. To keep the code of Casdoor clean and easy to understand, I developed go-sms-sender. It is designed to use all kinds of SMS providers easily. Only few lines of code is needed to send a SMS via the sender. With go-sms-sender, I also implemented the function of sending verification code via Email and SMS for Casdoor.
Turing test: Users are required to pass a Turing test before sending a verification code to their Emails or Phones.
Casdoor SDKs: Casdoor is written in Golang, but it supports many languages. Casdoor uses HTTP requests to communicate with those SDKs. I participated in the development of Casdoor Go SDK, Casdoor JS SDK (supported popup sign in and sign up), Casdoor Java SDK, and reviewed the code of Casdoor PHP SDK.
Casnode
Casnode is the official forum of Casbin. Casnode is suitable for open source organizations to use because it supports the two-way synchronization to Google Groups, and can sync its topics and replies to all mailing lists.
Night mode: I supported the night mode for Casnode. Now, users can click the switch button to switch between night mode and light mode.
Refactored the OSS support: Casnode uses Aliyun STS as a storage provider before. This not that safe because users can upload any file to anywhere in the storage server. I refactored the storage system with another Go module called qor, which supports variables of storage providers, and upload these files in the backend, which is safer than before.
Server side rendering: Casnode is written in React, which means that bots from search engines can not get the forum details because they can not execute JS code. I used Chromedp in Golang backend, and added a filter for bots. If a HTTP request has a bot
keyword in its User-Agent
, it will be recognized by the bot filter, and will receive a rendered page with forum details. This way, you can get the information of the forum from search engines.
Mailing list support: Casnode sends Emails to a mailing list when new topics or new replies are made. It can sync all new topics and replies to all mailing lists, and supports the two-way synchronization to Google Groups. This made Casnode suitable for open source organizations to use.
Embeded plugin: I implemented the embeded plugin for Casnode. With the plugin, only few lines of HTML code is needed to embed Casnode as a reply plugin to any webpage. For example, Casbin OA uses Casnode Embedded Plugin as a reply plugin.
Contributions
Here are my contributions to Casbin community.
Open Issues
- Open Issue Balance didn’t refresh after receiving “today’s checkin bonus”
- Open Issue A suggestion for README.md
- Open Issue Forum website login error
- Open Issue The installation commands in the docs do not work properly
- Open Issue Add a self check at the beginning of the program
- Open Issue Add a self check when the program starts
Open Pull Requests
- Open PR fix: notification bug
- Open PR fix: bonus bug and Chinese translation missing
- Open PR feat: add go backend API docs
- Open PR feat: Go backend API docs
- Open PR Fix: Avatar uploading failed
- Open PR fix: converted sts to qor
- Open PR feat: convert Aliyun STS to qor/oss
- Open PR fix: member page links bug
- Open PR fix: rich text editor img bug
- Open PR fix: rich list bug
- Open PR feat: add sensitive words block
- Open PR fix: node bugs
- Open PR feat: added imgs and css for forum night mode
- Open PR feat: added night mode
- Open PR add: night.js for casbin-forum
- Open PR feat: added avatar tailoring and uploading
- Open PR Support avatar tailoring and updating
- Open PR added explainations to Dev and Prod usage in README
- Open PR added details about EnforceEx()
- Open PR Fix: https://github.com/casbin/casbin-website/issues/82
- Open PR Fix: Error document
- Open PR added Casbin RBAC and RBAC96
- Open PR added Casbin RBAC and RBAC96
- Open PR added a tutorial for APIs
- Open PR feat: add info about MySQL and Postgres in readme
- Open PR feat: add pg for db adapter
- Open PR feat: recognize google group email correctly
- Open PR feat: sync google group conversations to Casnode
- Open PR fix: typo in readme
- Open PR feat: init commit
- Open PR feat: added Mailing List
- Open PR feat: node header image
- Open PR fix: node background image uploading failed
- Open PR fix: add min width to desktop pages
- Open PR feat: added cdp for ssr
- Open PR fix: avatar display error in topic page
- Open PR fix: picture too wide in notification page
- Open PR fix: reply box height and avatar too small
- Open PR add reset username and fixed HTML tag display error
- Open PR fix: img doesn’t show in richtext editor replies
- Open PR fix: page didn’t jump on mobile UI and reply links
- Open PR fix: reload replies from backend incorrectly
- Open PR refactor: rewrite topic page logic
- Open PR fix: reply page bug and admin new node page crash
- Open PR Initialized docusaurus files and added CI
- Open PR made last page the default page of reply box, and made auto jump smooth
- Open PR feat: auto jump when reply is not in the first page
- Open PR fix: login check bug
- Open PR fix: mobile select2 and casnode reply img error
- Open PR fix: made casnode adapt the layout according to the page size
- Open PR feat: convert casbin forum to casnode
- Open PR fix: rich text editor doesn’t refresh after replying
- Open PR fix: text colors are not in effect
- Open PR feat: add provider intro
- Open PR feat: add basic intro to Casdoor
- Open PR fix: removed outdated lines in README
- Open PR feat: use retro style when user did not set gravatar
- Open PR fix: add Re to mailing list replies
- Open PR fix: print log when the cookie expires
- Open PR feat: update crawler to the latest version
- Open PR fix: http client aren’t closed
- Open PR refactor: rewrite all logic
- Open PR fix: Conversation message split
- Open PR fix: Conversation message error
- Open PR refactor: rewrite crawler logic to get conversations
- Open PR fix: code won’t exit when an Internet error happened
- Open PR feat: add cookies when getting messages
- Open PR fix: invalid date for Google group messages
- Open PR fix: time syntax error in Google groups conversations
- Open PR feat: get conversation start time
- Open PR feat: turing test before sending code
- Open PR feat: intergrate verification code countdown as a component
- Open PR feat: check email and phone number when signing up
- Open PR feat: upload avatar to oss when sync from google group
- Open PR feat: Maven project init and add getUsers() getOrganizations() API
- Open PR fix: add judgement to avoid crashing
- Open PR fix: remove all dom APIs from the project
- Open PR Fixed reset phone email data error and removed dom API from ResetModal.js
- Open PR feat: add reset Email and phone by using verification code.
- Open PR Add Tencent Cloud and Aliyun as providers
- Open PR feat: set password for users
- Open PR feat: update crawler to v0.0.6 to remove quote from replies
- Open PR feat: removed gmail quote from replies
- Open PR feat: auto create user during synchronization from Google Groups
- Open PR fix: added some judgement to avoid crashing
- Open PR feat: add author name to email mapping
- Open PR feat: add architecture overview, main-package, routers, controllers
- Open PR Add low version SQL support to search
- Open PR Removed keywords in html Tags when searching
- Open PR Add nil judgements to balance and notification backend to avoid crashing and fixed avatar error in search results
- Open PR feat: add get started page
- Open PR feat: in-site search for topics
- Open PR fix: update crawler to v0.1.2 to avoid crashing
- Open PR fix: signup bug
- Open PR fix: http response nil
- Open PR feat: convert to casdoor go sdk
- Open PR fix: remove panic in internet errors to avoid crashing
- Open PR fix: redirect urls null in app-built-in
- Open PR feat: add update delete User
- Open PR fix: wrong usement in getUsername
- Open PR feat: authorize via clientId and clientSecret
- Open PR Basic Code
- Open PR fix: nginx reload command
- Open PR feat: expose email and sms APIs as services to SDK
- Open PR feat: integrate Storage config into providers
- Open PR feat: integrate OSS into providers
- Open PR feat: use Casdoor SDK to signup
- Open PR Customized OAuth provider login URL
- Open PR Added Casdoor JS SDK
- Open PR feat: add react lazyload
- Open PR feat: auto login session will expire after 24h
- Open PR feat: support SAML okta login
- Open PR feat: add auto release CI
- Open PR added a new Button component.
- Open PR feat: add Button component
- Open PR feat: add semantic release
- Open PR fix: code mirror editor display bugs
- Open PR feat: Hide Nodes and Topics
- Open PR feat: support popup window
- Open PR feat: use casdoor-js-sdk to signin and signup
- Open PR fix: add nodeId in getTopicByUrlAndTitle
- Open PR feat: add Casnode embed plguin
- Open PR feat: change provider name
- Open PR feat: login in embed reply
- Open PR feat: add VolcEngine as a SMS provider
- Open PR feat: update go-sms-sender to v0.0.2 to support VolcEngine
- Open PR feat: add router and APIs for embed plugin
- Open PR Embed plugin
- Open PR Add API to get topic by url and title
- Open PR feat: modified user, and return user directly
- Open PR feat: add user initScore in app.conf
- Open PR feat: add user initScore in app.conf
- Open PR refactor: use ResponseError to response error
- Open PR fix: use ReponseError to response error
Review Pull Requests
- Review PR fix: all codemirror focus area
- Review PR fix: Perfect the function of add node
- Review PR feat: add “forget password” [front & backend]
- Review PR feat: Add new member in UI #194
- Review PR fix: codemirror textarea focus area
- Review PR feat:Add advertisement banners to the forum
- Review PR feat: add password Item forcibly
- Review PR add check node info on add new topic and reply
- Review PR fix: improve i18n and add some translation
- Review PR fix: Return to the previous page after language selection
- Review PR fix: sync google group attachment files to links
- Review PR fix: sync attachment files
- Review PR feat: add member and poster swagger api docs
- Review PR fix: Merge the same translation words #108
- Review PR feat: add topic and account swagger api docs
- Review PR feat: migrate beego from v1.x to v2.x
- Review PR fix: user balance not updated after login #276
- Review PR feat: Allow the user to sign up with OAuth
- Review PR fix: The administrator cannot enter the administrator background #275
- Review PR fix: Fix the debug warnings in browser console #269
- Review PR feat: Allow the user to sign up with OAuth
- Review PR fix: Fix the bug that the ad doesn’t show up for anonymous access #270
- Review PR feat: allow user signup with oauth
- Review PR feat: Add auto-generated topic tags
- Review PR feat: users can add tags to posts when they publish them #197
- Review PR feat: add “forget password” [front & backend]
- Review PR refactor: change jsdelivr to cdn.casbin.org
- Review PR fix: topic author error and memberbox fresh
- Review PR feat: implement the basic framework of casbin-oa app
- Review PR refactor: change cdn
- Review PR feat: general implement
- Review PR feat: improve ApplicationEditPage
- Review PR feat: fix header bugs, improve UI, optimize touchscreen experience
- Review PR feat: You can get Prs from github automatically
- Review PR feat: support LDAP
- Review PR feat: Add log table and record all user behaviors into the table, add UI to view logs
- Review PR feat: support 2fa
- Review PR feat: support login UI customization
- Review PR feat: add installation by BT panel
- Review PR Add the code.
- Review PR feat: Install Casnode by BT panel
- Review PR fix: Correct a small bug
- Review PR feat: Integrate Crowdin
- Review PR feat: add frontconf management
- Review PR Add VolcEngine SMS service support
- Review PR fix: table errors in frontend
- Review PR feat: support local storage
- Review PR feat: mount app.conf to container
发表回复