Comments (16)
Update:
Hi @anitab-org/bridgeintech-maintainers, So, I've managed to register to MS through calling its API from BIT Users service
Environment:
MS - Local server port: 4000; database name: local_data
BIT - local server port: 5000; database name: bit_schema
Now I'm in the process of creating BIT API using user_extension DAO and adding model to namespace.
I come across first issue.
It is difficult to achieve the Registration process as per what I want to achieve in the mockup where I need to add user_id into user_extension in BIT table at the same time as I create the user in the MS table. The reason is atm there's no way of finding the new user id unless the user has verified email and login (the only way to get it atm is using GET /user but it requires a token)
Can anyone help me with suggestion on how to get around this?
One of the solution I can think of atm is to have BIT POST /register taking the exact same input as per MS POST /register. Then when user first login, the first page they would see is the user's update profile page that they must fill in before they can go to their member homepage (since the values on the 2nd form (additional information) will determine their navbar type: with organization or without and time offset for dates related data).
Please feel free to share your thoughts.
from bridge-in-tech-backend.
I see.... 😂. I've just opened my 1st PR to issue#19 😊. Hopefully that's ok (starting before the official coding phase starts 😀)
from bridge-in-tech-backend.
@mtreacy002 your above suggestion seems fine. Please go ahead with that.
from bridge-in-tech-backend.
@mtreacy002 please let me know if you have questions about this. cc: @isabelcosta
from bridge-in-tech-backend.
Ok. Will work on it, @ramitsawhney27. But should I open a PR first to merge the code for the database schema and mock data I've done on issue#19?
from bridge-in-tech-backend.
@mtreacy002 you will see a lot of issues like this coming up, but before this one it comes the one you already created #19 :) This is for the coding phase which has not started yet ;)
from bridge-in-tech-backend.
All good @mtreacy002 :P
from bridge-in-tech-backend.
According to my understanding, you want to register a user to BIT. Questions: When a user register to BIT, does it mean there are registered to MS too? For a user registered in MS, when that person logs in, does he/she have to register (new profile) to BIT or does he/she update BIT profile based on the pre-existing MS profile?
from bridge-in-tech-backend.
The ideal answer is yes, user have one data for both BIT and MS. But it's not achievable in this GSoC. For now, the BIT user will login using the MS schema, which at initial stage of GSoC is going to be kept inside MS db. But at the later stage, we want MS and BIT to have the same DB end (one DB).
If the MS already have user data, and that user wants to also register with BIT, yes, then they need to add BIT related data on the BIT side. But this is not within GSoC scope. Atm, the initial Register is only for one way, that a new user is registering using BIT web app, which will keep their data in both MS and BIT schemas.
Does this answer your question?
from bridge-in-tech-backend.
So for GSoc, we have two tables, one for BIT and one for MS. And post GSoC we make one table that can be the source of truth for all users? Is that correct?
from bridge-in-tech-backend.
But if we make it as the option I mentioned in the previous post
One of the solution I can think of atm is to have BIT POST /register taking the exact same input as per MS POST /register. Then when user first login, the first page they would see is the user's update profile page that they must fill in before they can go to their member homepage (since the values on the 2nd form (additional information) will determine their navbar type: with organization or without and time offset for dates related data).
then, I think we'll cover both new or existing MS user (coz there will be no difference coz they both will be able to access BIT)
from bridge-in-tech-backend.
So for GSoc, we have two tables, one for BIT and one for MS. And post GSoC we make one table that can be the source of truth for all users? Is that correct?
No, actually the tables are just one, but we have 2 schemas, BIT and MS.
In MS we have
- User
- Mentorship Relation
- Task List
- Task Comment
and in BIT we have
- user_extension
- personal background
- organization
- program
- mentorship_relation_extension
from bridge-in-tech-backend.
Sorry... I'll explain to you further tomorrow. I need to get to sleep now, almost 2am here 😂
from bridge-in-tech-backend.
Sure, please take care @mtreacy002
from bridge-in-tech-backend.
Please take of validations at the API level, details of the validations are in here - anitab-org/bridge-in-tech-web#8
from bridge-in-tech-backend.
Please take of validations at the API level, details of the validations are in here - anitab-org/bridge-in-tech-web#8
Can I confirm this. You mean we should do the validation on the Frontend UI, right? for backend, it needs to be done from the mentorship-system backend (need to open an issue and handle this backend validation there). Coz BIT is only using the MS API, but cannot alter the backend code. We can try to do it at BIT API level, but then it would still allow someone to bypass entering directly to MS API.
Ideally we should have 4 levels of validations, BIT UI, BIT API, MS API and MS UI. But if this is needed, then we just have to take care of it 😂.
For now (during GSoC), I'll cover the BIT UI and API then 😉
from bridge-in-tech-backend.
Related Issues (20)
- Improvement: Refactor code to use dict.get() method HOT 2
- Improvement: refactor expected_fields_validator HOT 10
- Task: Set up local environment HOT 7
- Improvement: Add typehints to User module HOT 3
- Improvement: Add typehints to Organization module HOT 3
- Improvement: Add typehints to Programs module HOT 6
- Research : Ideas for how to add members to an organization HOT 1
- Research : Integrate Notifications HOT 15
- Migrating Travis to Github action HOT 9
- Frontend UI Redesign HOT 3
- Migrating to Github Actions
- Fix tests failing on github actions HOT 6
- test
- Improve Github actions HOT 4
- Dev: Add BIT web gh-pages remote to CORS
- Dev: Move Docusaurus from surge to gh-pages HOT 3
- Docs : Add setup tutorial to `.github/ENV_SETUP_INSTRUCTION.md` HOT 3
- Make project beginner friendly HOT 8
- Update organization name from AnitaB.org to anitab-org in docusaurus config HOT 2
- Update github email and name in documentation workflow HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bridge-in-tech-backend.