Giter VIP home page Giter VIP logo

jagratiwebapp's Introduction

Jagrati - An initiative of IIITians

Jagrati is an initiative by the students of IIITDM Jabalpur to provide free and quality education to the poor and underprivileged children of villages surrounding our institute.

Currently, we have adopted 5 villages in the vicinity of our institute, namely, Gadheri, Amanala, Chanditola, Mehgawan, and Suarkol where we provide education to around 100 children of classes 1 through 10. Apart from providing basic education to the students in regular classes, we also prepare the students of 4th and 5th grade for the prestigious Navodaya Vidyalaya and other similar government-funded institutions which provide quality education to students, completely free of cost.

Apart from teaching the children, we do many other activities like organizing Blood Donation Camps, Tree Plantation Drives, Cloth Donation, Stationery Distribution, Campaigns to spread awareness in villages, etc.

Our Achievements:

  • 1 student was selected for Jawahar Navodaya Vidyalaya in 2018.
  • 1 student was selected for Jawahar Navodaya Vidyalaya in 2019.
  • 2 students were selected for Jawahar Navodaya Vidyalaya in 2020.
  • 4 students cleared the entrance examination for Eklavya Model Residential School (EMRS) in 2020.
  • 4 students cleared the entrance examination for Gyanodaya Vidyalaya in 2020.

(Like Navodaya Vidyalaya, both EMRS and Gyanodaya Vidyalaya provide free quality education to students from class 6 to 12).

Currently, we are operating in online mode to prepare students of class 5 for Navodaya Examination, 2021.

About JagratiWebApp

JagratiWebApp is the official web application for managing day-to-day operations at Jagrati, like keeping track of the content being taught in a class and homework being given to the students, taking and keeping a record of student and volunteer attendance, keeping a record of all the students being taught under the initiative and the volunteers contributing towards the initiative among many things.

The main aim of the application is to simplify the work of volunteers by making all the information readily accessible to them like what was taught in the last class or in the last week and how many students attended those classes so that they can easily decide what should be taught on the present day and update the same in the application. Plus, it also helps in taking the attendance of students with more ease over the conventional method of manually taking note of the names of all the students present.

So, all in all, it is meant to help the volunteers work more effectively and efficiently and make it easy to keep track of daily activities.

Technology Stack

Frontend:

HTML5 CSS3 Bootstrap JavaScript

Backend:

Python Django

Database:

SQLite MySQL Postgres

To-Do

New pages

  • List of all Students
  • List of all Volunteers
  • Student Profile
  • Volunteer profile
  • Update Student Profile
  • Update Volunteer Profile
  • Add new Student
  • Calendar containing class schedule, events and other national/international important dates.
  • Page for Managing Permissions
  • Page for viewing and managing feedbacks
  • Web Team Page

New Apps

  • Jagrati Inventory
  • Events
  • Meetings
  • Study Material

New Features

  • Notifications
  • Leaderboard (no. of hours contributed to Jagrati)

Contributing

Setting up the project

  • Download and install Python 3.7

  • Download and install Git.

  • Fork the Repository.

  • Clone the repository to your local machine $ git clone https://github.com/<your-github-username>/JagratiWebApp.git

  • Change directory to JagratiWebApp $ cd JagratiWebApp

  • Add a reference to the original repository
    $ git remote add upstream https://github.com/garg3133/JagratiWebApp.git

  • Install virtualenv $ pip3 install virtualenv

  • Create a virtual environment $ virtualenv env -p python3.7

  • Activate the env: $ source env/bin/activate (for linux) > ./env/Scripts/activate (for Windows PowerShell)

  • Install the requirements: $ pip install -r requirements.txt

  • Create a new file in the root directory of the repository (JagratiWebApp) with the name .env (only .env and not .env.txt) and add the following content to it:

    EMAIL_HOST_USER = '[email protected]'
    EMAIL_HOST_PASSWORD = 'your-password'
    
    SENDER_EMAIL = 'Jagrati <[email protected]>'
    ADMINS_EMAIL = ['[email protected]']
    
    SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = 'google-oauth2-key'
    SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'google-oauth2-secret'
    

    or, just copy the .env.save file from the samples directory to the root directory (JagratiWebApp) and rename it to .env (only .env and not .env.txt)

    where,

    • EMAIL_HOST_USER and SENDER_EMAIL is the email address of your Gmail account from which you want to send emails (By default, Django will output email content into the console. To actually send emails to real users, comment line 30 and uncomment line 31 in Jagrati/settings/development.py).
    • EMAIL_HOST_PASSWORD is the password for that Gmail account.
    • ADMINS_EMAIL is a list of email addresses of Admins of the site (who will receive important updates from the site like when a new user joins in).
    • SOCIAL_AUTH_GOOGLE_OAUTH2_KEY and SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET are the API keys for login/signup using Google.

    Note: All the changes mentioned above in the .env template are optional and you do not need to change anything if you want all the email contents to be printed in the console itself and you do not wish to use the login/signup through Google. The changes in the first 4 lines in the .env file are required only if you wish to send out real emails to real people and changes in the last 2 lines are required only if you wish to use login/signup through Google.

  • Copy sample-db.sqlite3 from samples directory to the root directory (JagratiWebApp) and rename it to db.sqlite3.

  • Make migrations $ python manage.py makemigrations

  • Migrate the changes to the database $ python manage.py migrate

  • Create admin $ python manage.py createsuperuser

  • Run the server $ python manage.py runserver

๐Ÿ’ก๏ธ Pro Tip:

  • Always keep your master branch in sync with the main repository (by running $ git pull upstream master on your local master branch).
  • Always create a new branch before making any changes ($ git checkout -b <new-branch-name>), never ever make any changes directly on the master branch.

Setting up the project in docker

  • Fork the Repository.

  • Clone the repository to your local machine $ git clone https://github.com/<your-github-username>/JagratiWebApp.git

  • Change directory to JagratiWebApp $ cd JagratiWebApp

  • Copy the .env.save file from samples directory to the root directory (JagratiWebApp) and rename it to .env (only .env and not .env.txt).

    (Read the above section for details on all the variables used in .env file)

  • Copy sample-db.sqlite3 from samples directory to the root directory (JagratiWebApp) and rename it to db.sqlite3.

  • Build the docker file to an image sudo docker build -t <IMAGE_NAME> .

  • Run the docker image sudo docker run -p 8000:8000 <IMAGE_NAME>

  • The server will start at the default port (8000), head over to your web browser to test.

Contributing Guidelines

  • Feel free to open an issue to report a bug or request a new feature.
  • Before starting to work on an issue, comment on that issue that you want to work on this and then only start to code.
  • Create a new branch with a related name of the motive i.e. bug/refactor/feature and commit your changes in that branch only.
  • Send a pull request anytime :)
  • Join our Discord Community: https://discord.gg/Ek9q45ZjAv
  • For more extensive guidelines, kindly check the CONTRIBUTING.md๐Ÿค

Open source programs we have been a part of ๐Ÿš€:

Open source is a term that originally referred to Open Source Software (OSS). Open source software is code that is designed to be publicly accessible -- anyone can see, modify, and distribute the code as they see fit. There are a lot of open source programs held throughout the year to encourage people to contribute to open source and build awesome projects for the community. JagratiWebApp is one such open source project and has participated in quite a few events like the following.


Kharagpur Winter of Code
2020

Script Winter of Code
2020

Mexili Winter of Code
2021

Girlscript Summer of Code
2021

Project Maintainer ๐Ÿ˜ƒ


Priyansh Garg

๐Ÿ’ป

Our valuable Contributors๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป:

jagratiwebapp's People

Contributors

96radhikajadhav avatar aayush-hub avatar akanimesh avatar akrish4 avatar akshay399 avatar chiragsharma1 avatar cryptofox17 avatar danbrown47 avatar dependabot[bot] avatar divyanshkhetan avatar dynamoh avatar garg3133 avatar harshakhmk avatar infiniteverma avatar jkrlr avatar m-code12 avatar n00bmaster2810 avatar palak199 avatar priyansh3133 avatar raman08 avatar rray14 avatar saatviknagpal avatar sagarpandyansit avatar sammy8825 avatar satwik-talluri avatar tanishq-arya avatar tejaswari7 avatar vismitap avatar vrindagupta6828 avatar vybhav72954 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

Watchers

 avatar  avatar  avatar

jagratiwebapp's Issues

Fetch date from Django instead of using Javascript date

Details on the issue:
Use dates fetched from Django on Dashboard, Student Attendance and Volunteer Attendance pages. Currently, these pages display dates fetched from JavaScript which in turn uses system date which is a huge security flaw in the application as on changing the system date, the date conceived by app as today may be changed. Whereas on fetching date from Django, it will use the server date/time and not system's.

How to reproduce:

  1. Set up the app on your local pc (instructions given in README.md.)
  2. Create an account in the app (along with completing all profile details).
  3. Login with that account.
  4. You'll be redirected to Dashboard. Here at top-centre, a Date field is present which is being fetched from Javascript. You need to fetch it using Django.
  5. Volunteer Attendance page can be accessed at http://127.0.0.1:8000/volunteers/attendence.
  6. Students' Attendance page can be accessed at http://127.0.0.1:8000/students/attendence.

Do the same thing done in 4 in 5 and 6 also.

Note: This issue can be assigned to 3 people simultaneously who can work on all 3 pages separately and discuss in the community.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

Setup permissions to access "Add new student" page

Since we have a page to add students, it will be good to have a group called as a "student manager" which comprise of some students or volunteers who will have authentication rights to add a new student.

Clicking on student name should open student profile

On clicking on the student name (appearing anywhere throughout the app), the student's profile should open in a new tab.

If I remember correctly, right now student names appear in two places, one on student attendance page (/students/attendance/) and other on the dashboard ('/dashboard/). The student profile can be found at /students/profile/<user_id>/.

Solving this issue requires a basic understanding of Django.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

Automate Copyright year updation according to current year

Find all the places where Copyright message is written and automate Copyright year updation by replacing year written manually with {% now 'Y'%} template tag.

Also, do share screenshot in the PR showing that it is working properly.

CODE OF CONDUCT and CONTRIBUTION file

Hi @garg3133
This is a great intiative
I would like to contribute to this project , I found that there is no code_of_conduct file and you know code of conduct is an important file which all the contributors need to follow so I would like to work on this issue , I can make a new file of code of conduct and a contribution file and can copy the contribution guidelines given in README file and can improve README file
Kimdly assigne me

Fix Jagrati Tagline

On Jagrati landing page, "an initiative by iiitians" should be replaced with "an initiative of IIITians".

New Page: List of all Volunteers

We need a new page to be displayed at /volunteers/ to list all the volunteers currently a part of the initiative, in the form of clickable cards which will take us to the volunteer profile upon click.

Working on this issue will require knowledge of HTML, CSS + Bootstrap4 and a basic knowledge of Django.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

[TEST] Email field is not properly checking the regular expression for email

Details on the issue:
While signing up for the volunteer or faculty, if you fill email-id randomly, it won't show any error.

How to reproduce:
Go to localhost:8000/accounts/login/ link. Try to enter "admin@gma" and password. It won't show any error and try to send an activation link.

How to solve it:
Make a JavaScript function that can check the regular expression for email.

Fetch initiatives from database on landing page

Instead of putting the content of different initiatives in HTML file, we should instead fetch the initiatives from the database.

For doing this, create a new model in misc app with name Initiative and the following fields:

  • title (Initiative title)
  • description (Initiative Description)
  • thumbnail (Initiative Thumbnail)

After creating the model, register the model in admin.py so that the initiatives content can be updated through Admin Panel.

And then at last, fetch the initiatives from the database on the landing page.

Feel free to ping me here if you are stuck somewhere :)

A profile page for students

Currently there isn't an option for students to view their profile.

  • I would like to add the student profile page. Please assign it to me.

Create a personal-info card on sidebar

Convert the marked portion of the sidebar in the image below to a clickable card which upon click (anywhere on the card) will take the user to the profile page (/volunteers/profile/<user_id>/).
image

Also, the card should contain profile picture, name and designation of the user (show Volunteer as designation if desig field in Volunteer model is set to null). All these three things should be centre-aligned without any heading.

Working on this issue requires basic/intermediate knowledge of Bootstrap 4 and basic knowledge of Django.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

Enhance Donations Modal on Home Page

Details on the issue:
On clicking the "Donate" button on the top navigation bar, a modal/pop-up appears which has a very basic design and does not look good. It would be better if the design of the modal could be improved (using colours as per the theme of the site).

Below is the screenshot of the modal.

image

Working on this issue requires an intermediate knowledge of HTML and CSS.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

New Page: Add a new student

We need a new page to add new students in the Student model. The page will be displayed at /students/new/ and will have all the fields as in the Student model.

You may refer to complete_profile page which appears after signing up into the application.

Working on this issue will require knowledge of HTML, CSS + Bootstrap4 and a basic knowledge of Django.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

Fix typo: Attendence --> Attendance

Details on the issue:
There's a typo in the complete application where attendence is being used instead of attendance. We need to fix that for the complete application.

Places where it is to be fixed:

  • README.md (beginner-friendly) [Done by @Godzilla5111]
  • Comments all over the application (beginner-friendly) [Done by @96RadhikaJadhav]
  • URLs and corresponding function names in views. (beginner-friendly) [Done by @96RadhikaJadhav]
  • Models, views and all other places. (needs some experience in Django) [Done by @GunjanDhanuka]

Note: This issue can be assigned to multiple people simultaneously who can work on removing the typo at different places mentioned above.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

Take student attendance using AJAX

Right now, for taking the student attendance, we need to mark all the present students as present (by ticking the corresponding checkbox) on /students/attendance/ page and then submit the form. The way it works is, it first marks all the students of the classes for which the attendance was submitted as absent and then marks the students for which checkbox was ticked as present.

But there's a problem in this approach, if two people take attendance of two different classes at the same time, the app will go into race condition and the attendance submitted by only one of them will be saved to database.

To resolve this issue, we need to take student attendance using AJAX where the attendance of the student will be marked and saved to the database just by ticking the checkbox, one student at a time and thus we don't need to submit the form to take attendance.

Solving this issue requires intermediate knowledge of Javascript (AJAX) and Django.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

A Linter for Python

As we are using Django as our backend, I believe it would be a good idea to have a Linter for Python.

This will help in enforcing guidelines, code quality, and documentation at the same time ensuring that no improper or vulnerable code has been pushed in the Repo.

Add gender field in Student model

Add a gender field in Student model of students app. You may refer to the Profile model present in the accounts app.

Working on this issue requires basic knowledge of Django.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

Intergrate Welcome Bot

Hi @garg3133
I can make a welcome and greeting bot which will welcome all users who opens a issue and pull request for the first time
using a config.yml file
Kindly do assign me

For reference, check out: https://github.com/apps/welcome

If you feel this is a great idea!
Please assign it to me.

Replace `Back to Dashboard` to `Refresh Page`

Replace Back to Dashboard link at the top-left of each page with Refresh Page on all the page it is appearing in.

Also, don't forget to include the "reload" icon before Refresh Page, just like on Dashboard.

Working on this issue requires basic knowledge of HTML.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

Student edit profile

Currently the edit profile feature isn't working.

  • I would like to work on it.

New Page: List of all Students

We need a new page to be displayed at /students/ to list all the students currently a part of the initiative, in the form of clickable cards which will take us to the student profile upon click.

To Do:

  • Create an empty HTML page displayed at /students/ endpoint.
  • Fetch student data from database and display in form of cards.
  • Add filter to filter the students section-wise.

Working on this issue will require knowledge of HTML, CSS + Bootstrap4 and a basic knowledge of Django.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

Add DP for students

Add a display_picture in Student model. Also, you need to use imagekit to compress the image before storing it.

You may refer to the implementation of profile picture for user profile in Profile model of accounts app.

Working on this issue requires intermediate knowledge of Django.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

Resend Activation Mail

Whenever a new user signs up, we send an activation link to his/her email address order to verify the same. But sometimes it may happen that the user may forget to verify his/her email address and the activation link may get expired. If this happens, the user will be permanently locked out of the app and won't be able to register again with the same email unless he/she contacts the admin.

So, there must an option to resend the activation link to the registered email address. The option should be available in the error message which appears while trying to log in with an unverified email address. You can use the existing account_activation_token in accounts/tokens.py to resend the activation email.

Working on this issue requires an intermediate knowledge of Django.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

"Integrity Error" on entering already existing roll number

Details on the issue:
While completing the profile after a fresh registration on the application, if the roll no. entered in the Roll No. field already exists in the database, it displays a yellow screen showing "Integrity Error". Instead, a check must be coded in the application while completing the profile to check if the roll no. entered by the user already exists in the database. If it does, show an error message toast on the page displaying "Roll No. entered already exists.".

How to reproduce:

  • Set up the app on your local pc (instructions given in README.md.)
  • Create an account in the app (along with completing all profile details).
  • Create another account in the app but this time enter the Roll No. used in the previous step.
  • You'll see a yellow screen with "Integrity Error" as shown in the screenshot below upon saving.

image

Solving this issue will require a basic to intermediate level of knowledge in Django.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

Misprinting

i think ',' should be there instead of ';'
Screenshot (14)

[FEATURE] Strong password recommended

Details on the issue:
While signing up for the volunteer or faculty, if you fill in anything except null as a password, it will be accepted. Password should be strong that contains at least 1 special character, at least 1 character should be in uppercase, at least 1 number should be there.

How to reproduce:
Go to localhost:8000/accounts/login/ link. Try to enter 'a' as a password. It won't show any error.

How to solve it:
Make a JavaScript function that can check the regular expression for a strong password. If a password is not strong, give the error accordingly.

Different pictures for initiative cards on home page

The "Our Initiative" section on the home page has 9 cards having the same picture. I think it would look better if we replace them with different pictures for each card. I would like to work on this issue if needed.
Screenshot (212)

Take volunteer attendance using AJAX

Right now, for taking the volunteer attendance, we mark all the present volunteers as present (by ticking the corresponding checkbox) on /volunteers/attendance/ page and then submit the form. On submitting the form, the backend first marks all the volunteers scheduled for that day as absent and then marks the volunteers for whom checkbox was ticked as present.

Also, if there are some extra volunteers on that day, we can add their roll_no by clicking Add more button on the page and if such a volunteer exists, he/she will also be added to the attendance.

What we want now is instead of marking all the volunteers as present and then submitting the form, the volunteers should be marked as present/absent using AJAX (that is, they will be marked as present/absent on backend also as soon as we tick/untick the corresponding checkbox and thus there will be no need of submitting any form).

So, this issue has two parts:

  • Mark volunteer attendance using AJAX.
  • Mark attendance of extra volunteers who are not already present in the list. (Put a single text input field in the Name column and Add button in checkbox column, instead of the Add more button. Whenever Add button is clicked after writing the roll_no in input field, that volunteer holding that roll_no should be added to the list using AJAX with his/her attendance already marked.)

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

(Implementation in #113 might help with this issue.)

Update UI

Current UI looks old.

  • Update Navigation Bar

  • Update Show-Case

  • Update About Us

  • Update Initiatives

contact icon

image
here the red contact us label opens on hover.
but a newbie can miss it out since only con appears. I think it can be replaced with a font awesome icon of phone.
I would like to do that if its needed.

Clicking on volunteer name should open volunteer profile

On clicking on the volunteer name (appearing anywhere throughout the app), the volunteer's profile should open in a new tab.

If I remember correctly, right now volunteer names appear in three places, one on the volunteer attendance page (/volunteers/attendance/), on the volunteers list page (/volunteers/list/), and last on the dashboard ('/dashboard/). You need to assign yourself a designation of Math Convener to view volunteer attendance on the Dashboard.

The volunteer profile can be found at /volunteers/profile/<user_id>/.

Solving this issue requires a basic understanding of Django.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

Disable Continue button on Dashboard until AJAX is fully loaded

On changing the Date on the main dashboard (after logging in), Section is fetched from the database for that particular date using AJAX. But sometimes, AJAX can get slow which can lead to delay in the fetching of Section on changing the Date. If the user clicks the Continue button at this time, wrong combination of Date and Section is sent back to the backend.

To avoid this, we should disable the Continue button until the AJAX is fully loaded.

Solving this issue requires basic to intermediate knowledge of HTML, CSS and Javascript.

For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv

Updating Home Page

The current Home page looks dull, can I shift it to /old with new Index Page on / .

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.