Giter Club home page Giter Club logo

deprecated-web's Introduction

Zoonk Banner

Warning

This software is still in development and not ready for production. DO NOT USE IT IN PRODUCTION YET. The current version will break when v1.0 is released. This README will be updated when it's ready for production.


Open-source alternative to create interactive courses like Duolingo.
Learn more »

Roadmap · Community

Table of Contents

About this project

Interactive learning is more effective than traditional methods. Learners remember 10% of what they hear, 20% of what they read but 80% of what they see and do. That's why 34 hours of Duolingo are equivalent to a full university semester of language education.

We love Duolingo. We think those kinds of interactive experiences should be used in more fields. That's why we're building Zoonk, an open-source platform to create interactive courses like Duolingo.

Tech stack

Getting started

Follow the instructions below to get Zoonk up and running on your local machine. We have a Dockerfile for deploying our demo app to Fly. For using Docker locally, see this.

Requirements

  • Elixir 1.17+ and Erlang 26+. Run elixir -v to find your current version for Elixir and Erlang.
  • Hex: mix local.hex.
  • Phoenix: mix archive.install hex phx_new.
  • PostgreSQL 15+: PostgreSQL.
  • (Linux users only): inotify-tools.

Local development

  • Run mix setup to install dependencies and set up the database and assets.
  • Run mix seed to fetch initial data to the database (See options).
  • Run mix phx.server to start a development server.
  • Run mix test to run tests or mix test.watch to run tests and watch for changes.
  • Run mix ci to run code quality checks.
  • Run mix locale to update translation files.

SSL on localhost

Prefer to do local development using SSL to resemble production as much as possible. You can use mkcert to generate a certificate. After you install mkcert, follow the steps below:

  • Create a cert directory under priv: mkdir priv/cert.
  • Generate a new certificate: mkcert -key-file priv/cert/selfsigned_key.pem -cert-file priv/cert/selfsigned.pem localhost zoonk.test "*.zoonk.test" apple.test.
  • Run mkcert -install to install the certificate in the system trust store.
  • You may also need to enable Allow invalid certificates for resources loaded from localhost on Google Chrome flags.
  • Restart your local server: mix phx.server. You may also need to restart your browser.

You also need to make sure your machine maps localhost to a test domain (we're using zoonk.test for this guide). dnsmasq allows you to resolve domains to your local machine without having to change your /etc/hosts file. To install dnsmasq:

brew install dnsmasq

# Create a configuration directory
mkdir -pv $(brew --prefix)/etc/

# Set up your domains
echo 'address=/zoonk.test/127.0.0.1' >> $(brew --prefix)/etc/dnsmasq.conf
echo 'address=/.zoonk.test/127.0.0.1' >> $(brew --prefix)/etc/dnsmasq.conf
echo 'address=/apple.test/127.0.0.1' >> $(brew --prefix)/etc/dnsmasq.conf

# Add dnsmasq to your resolver
sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/zoonk.test'
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/apple.test'

# Start dnsmasq
sudo brew services start dnsmasq

That's it! You can now start your local server (mix phx.server) and test your domains using:

Mailer

We're using Resend to send emails. To make it work in production, you need to set the following environment variables on your server:

  • RESEND_API_KEY: Your Resend API key.

Storage

You need to use an S3-compatible storage service to store your files. At Zoonk, we're using Tigris. You need to add the following environment variables:

  • AWS_ACCESS_KEY_ID: Your AWS access key ID.
  • AWS_SECRET_ACCESS_KEY: Your AWS secret access key.
  • AWS_REGION: Your AWS region.
  • BUCKET_NAME: Your AWS bucket name.
  • AWS_ENDPOINT_URL_S3: Your AWS endpoint URL.
  • AWS_CDN_URL: Your AWS CDN URL (optional. If missing, we'll use the S3 endpoint URL).
  • CSP_CONNECT_SRC: Your S3 domain (i.e. https://fly.storage.tigris.dev).

Translations

Follow the steps below to add a new language to Zoonk:

  1. Copy the priv/gettext/en directory to priv/gettext/<language_code>.
  2. Translate the *.po files.
  3. Add the language code to the locales list in config/config.exs.
  4. Add the language name to @supported_locales in lib/translate/translate_plug.ex.

Sponsors

deprecated-web's People

Contributors

dependabot[bot] avatar wceolin 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

Watchers

 avatar  avatar  avatar  avatar  avatar

deprecated-web's Issues

Support inline code in the post editor

Is your feature request related to a problem? Please describe.
When transitioning to the rich-text editor we ended up losing support for inlining code.

Describe the solution you'd like
We should add inline code support to the editor's toolbar.

Additional context
This kind of inline code isn't possible anymore:

image

Send email notifications

Is your feature request related to a problem? Please describe.
When someone receives a notification, they need to visit Zoonk to see them.

Describe the solution you'd like
We should have an option to send email notifications.

Additional context
We should also have an option to unsubscribe to email notifications.

Tasks

  • Add language field to notifications
  • Add notification to the settings page
  • Create Cloud Function for sending an email when a notification is created

Allow users to follow topics

Is your feature request related to a problem? Please describe.
It's hard to know when a topic I like has new posts or lessons.

Describe the solution you'd like
A new feature that allows users to follow topics.

Describe alternatives you've considered
N/A.

Additional context
This ticket should implement the following functionalities:

  • Add a follow/unfollow button to the topic page
  • Add a filter to the home page (all, following)
  • The following tab is the default when users are logged in
  • The all tab is the default when users are not logged in
  • When a user is logged in and they're not following anyone, display a link to show all posts
  • When a user isn't logged in and they click on following, then display the login form
  • The following tab displays all posts from the topics a user follows
  • When a user unfollows a topic, that topic's posts are removed from the timeline

Improve before/after view on edit history

Is your feature request related to a problem? Please describe.
It's very confusing to see what has changed in a post when going to the edit history.

Describe the solution you'd like
We should consider adopting a "split view" (before/after), similar to the one adopted by Wikipedia to see changes.

Additional context
image

Question & Answer similar to stack overflow

Is your feature request related to a problem? Please describe.
Currently, zoonk allows user to add comments to a Question, starting a thread of discussion. The answer given by the user may get lost in the comments thread. There is no way, User can find out the suitable answer to his question.

Describe the solution you'd like
All questions asked should have the answer option with the comments, and Question owner can select the best answer thereby giving more visibility /credibility to the person who has answered the question. It would also lead to an increase in user engagement, as users can find answer to their question in a glimpse.

Additional context
Add any other context or screenshots about the feature request here.

Not able to add question

Describe the bug
When I was creating a question on zoonk.org and tried to submit the question. It threw the
Function DocumentReference.set() called with invalid data. Unsupported field value: undefined (found in field createdBy.facebook)

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://en.zoonk.org/posts/add'

  2. Fill in title, content and select topic

  3. Scroll down and click on save.

  4. See error

Expected behavior
The question should be submitted.

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2020-05-26 at 5 22 04 PM

Desktop (please complete the following information):

  • OS: [Mac 10.15.4]
  • Browser [ chrome Version 81.0.4044.138 (Official Build) (64-bit)]

Additional context
Add any other context about the problem here.

Redirect duplicated topics

Is your feature request related to a problem? Please describe.
We get topics from Wikipedia pages. On Wikipedia, they have an option to redirect duplicated pages to existing ones keeping a default one when they have similar names (e.g. Remote work and remote working should be the same page).

Describe the solution you'd like
Add an option to automatically redirect a topic page to a different one. (E.g. "Remote working" could redirect to "Remote work").

Describe alternatives you've considered
N/A.

Additional context
When a post has a redirected topic, it should be replaced by the new one. For example, when a user adds a "Remote working" topic, it should be replaced by "Remote work" in the background.

This issue should be implemented after #35.

Add a list of posts a user edited to their profile

Is your feature request related to a problem? Please describe.
It's hard to see what contributions users made.

Describe the solution you'd like
We should display a list of posts users edited on their profile.

Additional context
We can query the editors field to do it:

db.collection("posts")
    .where("editors", "array-contains", userId)
    .orderBy("updatedAt", "desc")

Create a quiz section for topics

Is your feature request related to a problem? Please describe.
Learning in traditional ways is boring, we need more interactive ways for learning - maybe something similar to what Duolingo does for learning a language.

Describe the solution you'd like
Every topic should have a quiz section where users can create different levels and we provide a guided, interactive learning path. Those quizzes should also provide some context: focus on real-life problems rather than just memorizing information.

Describe alternatives you've considered
We've experimented with new formats (e.g. interactive stories) in the past but they were overcomplicated for creating and playing. We should stick to something simpler for now and evolve with time.

Additional context
It's important that our quizzes focus on practical examples. It should also be easy to create new steps. A quiz level could have hundreds of questions but we should group them by category and show a limited amount when playing a level (e.g. 10 or 20 steps to complete a level).

I think we should have a similar design to Duolingo's learning path: icons and the level's name. We should also be able to "connect" a level to a traditional chapter on our topic's learning path. For example, when playing a level a user can get more information by going to the chapter. The same for a chapter: have a button for an "interactive lesson" or "play a quiz" about that subject.

Previous lesson button is not showing up for chapter's first lesson

Describe the bug
When we navigate to a lesson, there's a "previous" and a "next" button at the bottom of the page. However, the "previous lesson" button isn't showing up for the first lesson of a chapter.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a chapter's first lesson
  2. Scroll down to the bottom of the content
  3. You'll see a "next lesson" button but no "previous lesson" one

Expected behavior
A "previous lesson" button should be displayed.

Screenshots
image

Desktop (please complete the following information):

  • OS: MacOS 10.13.6
  • Browser: Google Chrome
  • Version: 81.0.4044.122

Add create post button/icon to the navbar

Is your feature request related to a problem? Please describe.
There's no easy way to create a new post if we're inside other pages (e.g. posts).

Describe the solution you'd like
We should add a "create post" button/icon to the navbar (next to the notifications icon). We can do something similar to Reddit.

Save posts as draft

Is your feature request related to a problem? Please describe.
Sometimes we start writing a post but it takes some time to finish them we risk losing everything if something happens.

Describe the solution you'd like
We should have a way of saving drafts of posts before we publish them. We should also have a new menu where we can list all drafts a user created.

Note
Drafts should be visible to the author only.

Auto-save drafts

Is your feature request related to a problem? Please describe.
After we implement drafts (#36), we should also have a way for auto-saving them as we type to avoid data loss in case something happens.

Describe the solution you'd like
Auto-save drafts as we type them.

Send a notification when someone comments your publication

Is your feature request related to a problem? Please describe.
There's no easy way to see when someone commented on my posts.

Describe the solution you'd like
Send a notification when someone comments on a user's posts.

Describe alternatives you've considered
N/A.

Additional context
The following functionalities should be implemented:

  • Send a notification when a comment is made on a post
  • Add comments to notification settings
  • Send a notification when a reply is made to a comment
  • Don't send a notification when the commenter and the author are the same
  • Clicking on the notification goes to the comment page

Improve how the topic/group menu is displayed on mobile

Is your feature request related to a problem? Please describe.
The menu for topics and groups is taking too much space on mobile. It's hard to get to the real content.

Describe the solution you'd like
We should have a dropdown menu or something similar.

Additional context
image

Image links should have a name attribute

Describe the bug
When we navigate to a post list (e.g. home page), we see a link on the thumbnail image. However, it doesn't contain an accessible name. Hence, it cannot be read by screen readers.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://en.zoonk.org
  2. Inspect any image from the post list
  3. Accessible labels are missing

Expected behavior
Those links should have an aria-label.

Move topics away from Wikipedia

Is your feature request related to a problem? Please describe.
Right now, our topics are attached to Wikipedia. That means we're using Wikipedia API for searching and creating topics. That also means we cannot create a topic if it doesn't exist on Wikipedia.

That's good for standardizing topic names and to avoid vandalism/spam. However, that brings some problems because some topic names aren't available on Wikipedia. Even if we want to create a page on Wikipedia, that's not very straightforward because we're subject to their own rules.

For example, some time ago I wanted to create some lessons teaching Next.js - the web framework we're using for developing Zoonk. However, the Next.js page on Wikipedia wasn't approved by Wikipedia moderators based on the notability criteria (meaning their moderators think Next.js isn't notable enough to be on Wikipedia even though they allow a page about Nuxt.js, which is a similar framework).

So, I think it's not good for Zoonk in the long-term to be subject to arbitrary moderation rules created by Wikipedia moderators.

Describe the solution you'd like

The topic creation feature should be independent from Wikipedia. We should allow users to create/search topics directly on Zoonk.

Additional context

There's some extra work to make it work properly:

  • We need to replace the current search
  • We need to account for unexisting topics (i.e. users should be able to easily create new topics while searching for a topic name)
  • We need to work on a tool for merging duplicated topics (#7)

Show date of creation in posts

Is your feature request related to a problem? Please describe.
For me it is really important for context and to judge relevancy of articles and posts to be able to see the date of when the text was authored

Describe the solution you'd like
At a minimum I would love to see the date on the detail page in the hero section

Optimize image sizes and format

Is your feature request related to a problem? Please describe.
Even though we limit image sizes when users are uploading them, they're still large and inefficient. Plus, sometimes we only need a thumbnail (e.g. for posts list). We shouldn't load the whole image.

Describe the solution you'd like
We should optimize all images from posts, topics, and groups. We should consider using formats such as WebP and create different image sizes (e.g. thumbnails).

Additional context
Posts can have multiple images and they can also come from external sources (e.g. image from links added to the references). When should optimize all those images and, when coming from external sources, we should copy and upload them to our storage bucket.

Add a list of user comments to their profile

Is your feature request related to a problem? Please describe.
When accessing a user's profile, I can't see the comments they made.

Describe the solution you'd like
Add a "comments" section to a user's profile.

Describe alternatives you've considered
N/A.

Additional context
The following functionalities should be implemented:

  • A list of the latest comments are displayed on the user profile
  • A button to display all comments is displayed
  • A "no items" message is displayed when there are no comments
  • Clicking on the comment goes to the post

Allow comments to have rich-text

Is your feature request related to a problem? Please describe.
When giving an answer to a question, it requires more context and rich-text features (e.g. adding an external link, a video, a code snippet, etc.).

Describe the solution you'd like
We should enable the new rich-text editor to comments as well.

Allow users to follow others

Is your feature request related to a problem? Please describe.
It's hard to know when a user posts something new.

Describe the solution you'd like
A new feature that allows users to follow others.

Describe alternatives you've considered
N/A.

Additional context
This ticket should implement the following functionalities:

  • When a user posts something, adds the post to their followers' timeline
  • When a user unfollows another user, remove their posts from the timeline
  • Send a notification when a user starts following you
  • Add a link to view the user profile on the notification
  • Add a follow/unfollow button to the profile page
  • Add followers list to user profile
  • Followers list is private (not visible to other users)
  • Add following list to user profile
  • Following list is private (not visible to other users)
  • Display a following/followers count

Display a link to the activity page on reports

Is your feature request related to a problem? Please describe.
When someone reports a post, there's no easy way to find what post or edit was reported.

Describe the solution you'd like
We should display a link to the specific activity being reported.

Additional context
We need to create an activity page for that.

Display a progress bar for lessons

Is your feature request related to a problem? Please describe.
When going through a chapter, I don't have any sense of progress (what I've completed or not).

Describe the solution you'd like
We should add a progress bar to the:

Additional context
We might have to review the backend for how we handle chapter/topic progress. We're currently marking posts as read when we visit them. Then, we calculated how many posts are completed and how many there are in that chapter or topic. But what about deleted lessons? We need to remove them from the user's progress as well.

We also need to consider how we're going to handle a topic's progress. Are we going to count every post or lessons only?

Add "share post" form to the topic page

The topic page timeline should look similar to the home page. We should include a "share post" form. The placeholder should be something like "What did you learn about topic title?"

Add `createdAt` field to user data

Is your feature request related to a problem? Please describe.
We don't have an easy way to see when a user account was created.

Describe the solution you'd like
We should include a createdAt field to the user data collection when an account is created.

Automatically embed videos for references

Is your feature request related to a problem? Please describe.
When I'm adding a reference, it automatically fills in the title and description. However, videos aren't added to the post as one might expect to happen.

Describe the solution you'd like
When creating a reference and the link is a video, we should automatically add/embed it to the editor.

List spacing not working on mobile Safari

Describe the bug
When we have a list on a post, it doesn't display correctly on mobile Safari (iPhone 6 Plus).

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://pt.zoonk.org/posts/como-sugerir-novas-funcionalidades-rnjtq9jnx
  2. Scroll down until you an ordered list
  3. There's no padding/margin

Expected behavior
The padding/margin should match other paragraphs.

Screenshots

image

Smartphone (please complete the following information):

  • Device: iPhone 6 Plus
  • OS: iOS 12.4.8
  • Browser: Safari
  • Version: 12

Comment or Question like count issue

Describe the bug
Click on the comment or Question like button multiple and check the issue. See this screen recording for the issue
https://drive.google.com/file/d/1XrtA1I3AKptprFUlTRM7_TAvX-FawxSS/view?usp=sharing

To Reproduce
Steps to reproduce the behaviour:

  1. Go to 'any question'
  2. Click on 'like button multiple times'
  3. See error

Expected behaviour
Like button should get disabled after like/unlike or there should be throttling of response to avoid multiple API calls.

Screenshots
https://drive.google.com/file/d/1XrtA1I3AKptprFUlTRM7_TAvX-FawxSS/view?usp=sharing

Desktop (please complete the following information):

  • OS: [Mac ]
  • Browser [Chrome
  • Version [81]

Add basic stats to the admin page

Is your feature request related to a problem? Please describe.
It should be easier for admins to get some basic usage stats such as posts created, registered users, etc.

Describe the solution you'd like
Add a basic stats dashboard to the /admin page. Those stats should include the following data:

  • Posts
  • Posts per category (e.g. books, courses, examples, etc.)
  • Topics
  • Chapters
  • Comments
  • Registered users

Tasks

  • Create security rules for admin collection
  • Create function for updating posts count
  • Create function for updating post category count
  • Create function for updating topics count
  • Create function for updating chapters count
  • Create function for updating comments count
  • Create function for updating users count
  • Deploy firestore to staging
  • Deploy firestore to production
  • Deploy functions to staging
  • Deploy functions to production
  • Data migration
  • Update frontend to display stats

Reduce spacing for post list

There's too much spacing between the card edge and the content on postcards from the post list. We should decrease that spacing.

image

Remove mail links from references

Describe the bug
When we add links to a post, they're added to the references at the bottom. However, email links shouldn't be added.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new post
  2. Add a link to the content
  3. Save your changes
  4. Navigate to the recently created post
  5. Scroll down to the references list
  6. You'll see the email link there

Expected behavior
Email links shouldn't be included in the references.

Additional context

Remove existing email links from the database.

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.