├── appdev └── android-flutter │ └── app-cloning │ └── README.md └── back-end └── django ├── ecommerce-app └── README.md └── social-media-site └── README.md /appdev/android-flutter/app-cloning/README.md: -------------------------------------------------------------------------------- 1 | # **WhatsApp Clone** 2 | A simple clone of the popular app 'WhatsApp'. Go through the task given below to get started. 3 | ## **Task** 4 | You have to create a simple app similar to WhatsApp in functionality and appearance. In other words, you would be creating UI similar to WhatsApp and adding chat functionality along with image sharing facility (user registration is also required). 5 | The app has been divided into multiple phases which are described below. 6 | ### Phase 1: Clone the UI 7 | 1. Make a non-functional clone of the app. Take a look at [Building layouts](https://flutter.dev/docs/development/ui/layout/tutorial) page on Flutter Docs to get a basic idea of how to implement basic UI design. While working on the UI, following things have to be implemented - 8 | - Create different screens for the 'CHATS', 'STATUS' and 'CALLS' tabs, similar to the original app. 9 | - Work on the navigation feature for navigating from any one of the above tabs to another tab. 10 | - Create the chat screen, which would be visible once the user taps on any of the personal chats (which are displayed under the 'CHATS' tab) on their device. 11 | - Create two screens, which would allow the user to login or register in the app. 12 | 2. The user should be able to navigate from any tab to another by tapping on another tab. 13 | 3. The user should be able to get to the personal chat screen whenthey tap on any of their contacts on 'CHATS' tab. 14 | 4. You have to implement the app in Light mode only. 15 | ### Phase 2: Implement authentication, Link the app to device contacts list 16 | 1. Implement user authentication using Phone Number and OTP. This can be done using Google's [Firebase authentication](https://firebase.google.com/docs/auth). This is necessary to identify the person to whom a message should be sent. 17 | 2. For the app to send messages, the app would have to get the contacts list stored on the device using [contacts_service ](https://pub.dev/packages/contacts_service) package (Flutter) or [contacts-provider](https://developer.android.com/guide/topics/providers/contacts-provider) package (Android). 18 | ### Phase 3: Chat Functionality 19 | 1. Implement chat functionality. This means the users should be able to chat with each other i.e. the users should be able to see the messages they send or have been sent to them by other users. 20 | 2. This will be done using [Cloud Firestore](https://firebase.google.com/docs/firestore) service of Google Firebase. The app chats can be saved and retrieved using this feature and messages can be seen again even if user closes the app and restarts it. 21 | ### Phase 4: Implement Image Sharing 22 | 1. Users should be able to share images with each other through chats. 23 | 2. The image to be shared can be selected using [image_picker](https://pub.dev/packages/image_picker) package (Flutter). The image then needs to compressed using [flutter_image_compress](https://pub.dev/packages/flutter_image_compress) package (Flutter) before sending it to the server. 24 | 3. After the image has been compressed, it can be sent to the server using [Cloud Storage](https://firebase.google.com/docs/storage) service of Google Firebase. The app would be able to store image shared by a user in the storage on the server, and display the image to the user with whom the image has been shared. 25 | ### Time allotted - 26 | - Phase 1 : 5 days 27 | - Phase 2 : 2 days 28 | - Phase 3 : 5 days 29 | - Phase 4 : 4 days 30 | # 31 | _Task compiled by [mihir1607](https://github.com/mihir1607) from BITS-ACM_ 32 | -------------------------------------------------------------------------------- /back-end/django/ecommerce-app/README.md: -------------------------------------------------------------------------------- 1 | # Ecommerce App 2 | A basic online marketplace. Make sure you go through UX suggestions below before starting. 3 | 4 | ## Task 5 | You have to write a web app on which vendors can register themselves and add items they want to sell, and users can add money 6 | and order these items (the users have to register too!). 7 | 8 | There are multiple phases to this project. 9 | 10 | 11 | ### Phase 1: Basic functionality 12 | 1. Implement authentication. Use Django's [in-built authentication system](https://docs.djangoproject.com/en/3.0/topics/auth/). 13 | It's handy and easy to use. You must keep in mind that there are two kinds of users on your web app - the vendors and the customers. 14 | They are different because they are allowed to do different things. For example, a vendor is not allowed to order items, while a 15 | customer is not allowed to sell items. Your application should have one page on which vendors can register, and one on which users 16 | can register. 17 | 2. Create a well defined database structure and implement it in the models. When writing the models, keep the following in mind - 18 | * A customer can order from only one vendor at a time. 19 | * A customer can order only one item (but he can order multiple number of units of it) at a time. For example, if a vendor 20 | is selling footballs and basketballs, I can order 3 footballs *or* 2 basketballs, but not 3 footballs *and* 2 basketballs. 21 | * A vendor can add multiple items that he wants to sell, and he has to specify how many units of those items he 22 | has available. 23 | * An item must have an image, a title, a price and a description. 24 | 3. Allow vendors to add or delete items to sell. 25 | 4. Allow customers to add money (don't implement a payment gateway, just add whatever amount they want directly) 26 | 6. Allow customers to view orders that they have made previously. 27 | 6. Allow vendors to view all orders that were placed for items that they're selling. 28 | 7. Implement a '**home page**' where all items are listed. Items that have the highest sales should appear first. 29 | 8. Create a page for each vendor where his items are listed, sort of like 'vendor profile'. 30 | 9. Make sure that a customer cannot place an order if there isn't sufficient money in his account or if the item is out of 31 | stock. Perform more checks if needed. Show appropriate error messages. 32 | 10. Allow customers to change their address information. 33 | 34 | 35 | ### Phase 2: More features 36 | 1. Add Oauth - allow users to sign up with google. You can do this easily with a library called [Django Allauth](https://wsvincent.com/django-allauth-tutorial/). 37 | But for more experienced developers, I recommend you use [google's API client library](https://www.datadependence.com/2016/03/google-python-library-oauth2/) 38 | as things are a bit more flexible that way. 39 | 2. Notify the vendor with an email whenever someone buys from him. You can do this with [Sendgrid](https://sendgrid.com). 40 | Sign up for sendgrid and get your API key. [This code sample](https://sendgrid.com/docs/for-developers/sending-email/v3-python-code-example/) 41 | might give you an idea of how to do it. 42 | 3. You've been using the weak SQLite database which is not fit for production. Time for an upgrade. Change your project 43 | settings to use MySQL for the database. [This tutorial](https://www.digitalocean.com/community/tutorials/how-to-create-a-django-app-and-connect-it-to-a-database#step-3-%E2%80%94-install-mysql-database-connector) 44 | might help. 45 | 4. Allow the vendor to generate a CSV/Excel report of all his sales till now. 46 | 5. Remember how the customer could order only one type of an item at a time? Not anymore. Allow the customer to order multiple 47 | types of items at a time. So if a vendor is selling basketballs and footballs, I should be able to order two basketballs 48 | and three footballs at the same time. This might need some refactoring of your models, and you'll need to implement a 49 | *shopping cart* model for this. 50 | 5. Allow customers to add items to their wishlists. 51 | 6. Remember the *previous orders* list? If the user clicks on an order in this list he should be redirected to a new page where 52 | all details of this order are shown (for example, the time when the order was placed). 53 | 54 | 55 | ### Phase 3: Deploy! 56 | Your code is of no use unless it makes it to a production server! 57 | 1. Sign up on DigitalOcean using [this referral link](https://m.do.co/c/258499a2d433) to get $100 credit for two months. (Do 58 | not use your BITS ID for signing up). 59 | 2. Create a droplet (a droplet is just a fancy word for a virtual private server by DigitalOcean). You can ssh into this server. 60 | 3. Deploy your django application on the internet using nginx, gunicorn and supervisor. [This tutorial](https://rakibul.net/django-gunicorn-supervisor-nginx) 61 | might really help. 62 | 4. You're live! Go to the IP address of your droplet to see your application live on the internet! 63 | 64 | --- 65 | 66 | ### Additional features - 67 | You can implement some more features to really polish your web app and give it more functionality. The assignment is 68 | considered complete even if you don't implement the following. 69 | * Allow customers to directly move an item from wishlist to cart. 70 | * Allow vendors to change prices and other details of items. 71 | * Allow vendors to show discounts on items. 72 | * Allow customers to order **multiple items** from **multiple vendors** at a time, just like you can order different things 73 | from different sellers at the same time on Amazon. 74 | 75 | 76 | ### UX suggestions - 77 | If you want, you can make your app your way. But if you want to save yourself the time it'll take to come up with a proper 78 | 'design' for your app, you can do it this way - 79 | * Have a vendor dashboard. When the vendor logs in, he should be redirected to this dashboard. On his dashboard should be all 80 | the vendor related functionality. For example, there could be a link which redirects him to a page that shows him all the orders 81 | he has recieved. 82 | * On the vendor dashboard, add a link to a page on which the vendor can see all the items he is selling. He should be able 83 | to add and delete items from this page. If you implemented the *edit item details* (additional) feature, clicking on an item 84 | should redirect to a form to edit the item's details. 85 | * When the customer logs in, directly redirect him to the home page. On the home page, add links to pages that show the customer 86 | his previous orders, his wishlist, his shopping cart, etc. 87 | 88 | 89 | ### Time alloted - 90 | - Phase 1 - 5 days 91 | - Phase 2 - 4 days 92 | - Phase 3 - 1 days 93 | 94 | 95 | ### Submission Rules 96 | ***Securely*** share the source code on GitHub under your own account. 97 | 98 | What Securely means: 99 | 1. Don't share the Django secret key. 100 | 2. Don't share any test databases. 101 | 3. Don't share any database passwords/names or anything of the kind. 102 | 4. Don't share any API keys. 103 | 5. **Do** use common sense. 104 | 105 | Basically, don't share any data that must be kept secret. 106 | **Hint**: Make a python file where you store all of these values as variables (sort of like C/C++ macros in a header file), then add this file to your gitignore. Generally, we prefer to call that file the keyconfig. 107 | 108 | *Assignment compiled by [dush-t](https://github.com/dush-t) from DVM* 109 | -------------------------------------------------------------------------------- /back-end/django/social-media-site/README.md: -------------------------------------------------------------------------------- 1 | # Winter Assignment 2 | 3 | ### Aim 4 | 1. The Django polls app tutorial is only a way to get introduced to Django. It's not enough if you want to be able say that you actually "know" Django. So here, we are going to give you an opportunity to really learn Django and show us what you can do. This project will help/make you build proficiency in Django by having to create a full out project: a social media/blog kind of application. 5 | 6 | 2. Learn/use some new and important Python libraries and APIs. 7 | 8 | 3. Learn about what is involved in actually launching a live project. You'll have to host this project online (i.e. publically accessable from anywhere in the world... anywhere with an internet connection that is). You'll pick up some basic Linux server administration/management skills from this project. 9 | 10 | ### Task 11 | There are several "phases" or "legs" of this project: 12 | 13 | #### Phase 0: Apply for a GitHub Student Pack 14 | GitHub currently offers this great plan for students where you'll be able to get a ton of premium stuff for free. We'll let you find out what that stuff is. Apply for this pack ASAP, since it will take a day or two for your application/request to be processed. It won't be needed untill phase 3 though. 15 | 16 | #### Phase 1: The Basics 17 | Create a mini social media website using Django and some of the frontend skills that you have picked up. 18 | 19 | Apart from the following essential features, we're giving you the freedom of creativity in deciding what else you want to include. 20 | 21 | **Essential features** - these are some things that we expect to see implemented and certain aspects of Django and Python that we want to see being used. 22 | 1. Implement user authentication. Django has a built in auth system and we expect you to use it (it's part of Django's *"batteries included"* appeal). It's a really handy session based auth system. 23 | 2. Create a well defined database structure and then implement it in the models. 24 | 3. Associate users with a profile. Let users modify their profile data. 25 | 4. Allow users to make their own posts and also comment on others' posts (no need to implement commenting on comments). 26 | 5. Allow users to follow each other (hint: you'll need to use many-to-many fields). When you follow other users, make it so that the relavent posts can easily be accessed somewhere (sort of like a news feed). 27 | 6. Make it possible to edit and delete posts. But think about this issue: what if someone posts something offensive and then edits or deletes it.... how would you prevent cyber-crime and cyber-bullying caused by this? (this is an example of where your creativity as a developer will be needed) 28 | 29 | Make sure that you have a decent frontend for this. No need to make it too good, but just presentable enough... don't waste too much time on the frontend until after phase 3. 30 | 31 | 32 | #### Phase 2: Some Cool Features 33 | Now you will extend the basic project you created by adding some cool features which will require "some" additional learning on your part. Patience is key here. 34 | 1. Up until now, you've only been using an Sqlite3 database. Time to upgrade. Change your database backend to MySQL (since it's part of the DVM's tech stack). 35 | 2. Add a profile pictures feature. For this you'll need to learn how to store and reference/retrieve files and images in Django. You'll also probably need to learn how to do some image formatting using Pillow. 36 | 3. **Without** using the student pack that you got, make a seperate account on SendGrid. Then using SendGrid's API, extend the "following other people" feature so that you can choose to recieve mail based notificiations whenever that person makes a new post (so now there are two ways to follow a person.) 37 | 4. Extend the login system. Make it so that a person can also log in with Google. Use Google's API to provide OAUTH 2.0 based log-in. 38 | 5. Create a feature where staff and site admins can generate a report containing all of the basic profile data of each person registered on the site. The profile should be in the form of an excel sheet and we suggest using Openpyxl to get this done in python. 39 | 40 | 41 | #### Phase 3: Time To Go Live! 42 | You'll learn about more than programming here. Now you'll be introduced to the concept of tech stacks, Linux server administration and a bunch of other cool stuff. 43 | Finally, you'll be hosting your project on the internet. 44 | 1. Read up on web servers and what they are. Hint: Don't get confused between the hardware and software parts. The word "server" can refer to either one - there is the physical machine which you will be "renting" and then there is the server software that you'll be running which actually manages all of the requests e.g. Nginx or Apache. 45 | 2. Using the GitHub student pack, sign up on [Digital Ocean](https://m.do.co/c/9667283a00b2) to be able to get your own VPS (Virtual Private Server). Note the hyperlink I provided you with is my referal link. 46 | 3. Create an Ubuntu 16.04 or 18.04 server and then host your Django application. You'll find this [tutorial](http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/) **extremely** useful, and of course, google stuff to atleast roughly figure out what you're doing at each step of the tutorial. It will probably take some time and experience before you know what you're *exactly* doing at each step. 47 | 48 | #### Phase 4: Celebrate the completion of your project with a treat from your seniors back on campus :D 49 | 50 | ### Time Alloted 51 | - Phase 1 - 7 Days 52 | - Phase 2 - 4 Days 53 | - Phase 3 - 3 Days 54 | 55 | ### Submission Rules 56 | ***Securely*** share the source code on GitHub under your own account. 57 | 58 | What Securely means: 59 | 1. Don't share the Django secret key. 60 | 2. Don't share any test databases. 61 | 3. Don't share any database passwords/names or anything of the kind. 62 | 4. Don't share any API keys. 63 | 5. **Do** use common sense. 64 | 65 | Basically, don't share any data that must be kept secret. 66 | **Hint**: Make a python file where you store all of these values as variables (sort of like C/C++ macros in a header file), then add this file to your gitignore. Generally, we prefer to call that file the keyconfig. 67 | 68 | *Assignment compiled by [hypro999](https://github.com/hypro999) from DVM* 69 | --------------------------------------------------------------------------------