Scoold is a Q&A platform written in Java. The project was created back in 2008, released in 2012 as social network for schools inspired by StackOverflow, and as of 2017 it has been refactored, repackaged and open-sourced. The primary goal of this project is educational but it can also work great as a Q&A/support section for your website.
Scoold can run on Heroku or any other PaaS. It's lightweight (~4000 LOC) - the backend is handled by a separate service called Para. Scoold does not require a database, and the controller logic is really simple because all the heavy lifting is delegated to Para. This makes the code easy to read and can be learned quickly by junior developers.
- Full featured Q&A platform
- Database-agnostic, optimized for cloud deployment
- Full-text search
- Distributed object cache
- Location-based search and "near me" filtering of posts
- I18n and branding customization
- Spring Boot project (single JAR)
- Reputation and voting system with badges
- Minimal frontend JS code based on jQuery
- Modern, responsive layout powered by Materialize CSS
- Suggestions for similar questions and hints for duplicate posts
- Email notifications for post replies and comments
- Social login (Facebook, Google, GitHub, LinkedIn, Microsoft, Twitter) with Gravatar support
- SEO friendly
Scoold is deployed on a free dyno and it might take a minute to wake up.
- Create a new app on ParaIO.com and save the access keys
- Click here =>
OR
- Create a new app on ParaIO.com and save the access keys OR run it locally
- Create
application.conf
and configure Scoold to connect to Para - Run
java -jar -Dserver.port=8000 -Dconfig.file=./application.conf scoold.jar
ORmvn spring-boot:run
- Open
http://localhost:8000
in your browser
Important: Do not use the same application.conf
file for both Para and Scoold!
Keep the two applications in separate directories, each with its own configuration file.
Read the Para docs for more information.
The most important settings are para.endpoint
- the URL of the Para server, as well as,
para.access_key
and para.secret_key
. Connection to a Para server is required for Scoold to run.
This is an example of what your application.conf
should look like:
para.app_name = "Scoold"
para.port = 8080
para.env = "development"
para.host_url = "https://live.scoold.com"
para.endpoint = "http://localhost:8080"
para.access_key = "app:scoold"
para.secret_key = "*****************"
para.gmaps_api_key = "********************************"
para.admin_ident = "[email protected]"
para.support_email = "[email protected]"
para.google_analytics_id = "UA-123456-7"
para.code_highlighting_enabled = true
Note: On Heroku, the config variables above must be set without dots ".", for example para.endpoint
becomes para_endpoint
.
Scoold uses the JavaMail API to send emails. If you want Scoold to send notification emails you should add the following SMTP settings to your config file:
para.mail.host = "smtp.example.com"
para.mail.port = 587
para.mail.username = "[email protected]"
para.mail.password = "password"
para.mail.tls = true
para.mail.ssl = false
The email template is located in src/main/resources/emails/notify.html
.
Facebook is the default identity provider for Scoold, and you don't have to specify you FB app secret.
For authenticating with Google, you only need your client id (e.g. 123-abcd.apps.googleusercontent.com
).
For all the other providers, GitHub, LinkedIn, Twitter and Microsoft, you need to set both the app id and secret key.
# Facebook
para.fb_app_id = "123456789"
# Google
para.google_client_id = "123-abcd.apps.googleusercontent.com"
# GitHub
para.gh_app_id = ""
para.gh_secret = ""
# LinkedIn
para.in_app_id = ""
para.in_secret = ""
# Twitter
para.tw_app_id = ""
para.tw_secret = ""
# Microsoft
para.ms_app_id = ""
para.ms_secret = ""
You also need to set your host URL when running Scoold in production:
para.host_url = "https://your.scoold.url"
This is required for authentication requests to be redirected back to the origin.
- HTML templates are in
src/main/resources/templates/
- CSS stylesheets can be found in
src/main/resources/static/styles/
- JavaScript files can be found in
src/main/resources/static/scripts
- Images are in located in
src/main/resources/static/images/
Also, please refer to the documentation for Spring Boot and Spring MVC.
- Fork this repository and clone the fork to your machine
- Create a branch (
git checkout -b my-new-feature
) - Implement a new feature or fix a bug and add some tests
- Commit your changes (
git commit -am 'Added a new feature'
) - Push the branch to your fork on GitHub (
git push origin my-new-feature
) - Create new Pull Request from your fork
Please try to respect the code style of this project. To check your code, run it through the style checker:
mvn validate
For more information see CONTRIBUTING.md