Backend of niidl.co, an App created for intermediate coders as a place to search for and collaborate on code.
Check out our org on GitHub
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
Learning to code can be a daunting task. There are plenty of resources on how to get started, but once you understand the basics, you are thrust directly into the world of complex projects with intimidating code bases, and no direction. Here at niidl, we aim to bridge that gap by connecting engineers with projects that resonate with them, through advanced search features and personalized discussion boards. For the full story on niidl's inception, please visit our org page!
This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
To get a local copy up and running follow these simple steps. Please keep in mind this repo only includes the backend, you will also need fork niidl's client side repo which can be found here: niidl-client
For this application, you will need to have PostgreSQL version 12 or later, along with Node version 16 or later. To check your current version input the following command in your command terminal. For the App run locally, you will need to run a npm installation at both locations via the following command.
- node
node -v
For PostgreSQL, it will be a 2 step process, first to see if you have it installed.
-
Postgres Installation check
For Windows psql -U postgres For Mac psql
If Postgres is not installed you will receive an error. Otherwise, input the following to check your current version.
-
Postgres Version
SELECT version();
You will also need to create a [![Firebase][firebase.js]][firebase-url] account for the authentication process, if you do not have one already. Our App's backend has been deployed using , which while pricy was our best option when taking into account potential growth, as well as the volume of data needed stored. If you wish to deploy the App for free, we currently recommend [![Render][render.com]][render-url] as it is one of the few free deployment platform on the market, but please be aware that it can be quite slow.
Below you will find the basics on installation and set up. Please note you will need to follow the steps found on niidl-client before any deployment can be done.
- Clone the repo
git clone https://github.com/your_username_/Project-Name.git
- Module Installation
npm install
- Create a Postgres Database
-psql postgres CREATE DATABASE db_name_here
- Configure .env File
Create a .env file in your ROOT directory with the following
This App makes use of the GitHub API, while the project can be made without an API key, you will be limited to 50 calls an hour. Information on how to get your own Access Token can be found here.
DATABASE_URL = 'postgresql://postgres:test@localhost:5432/db_name_here'; GITHUB_ACCESS_TOKEN = accessTokenHere;
- Migration and Seeds via Prisma
npm run build-db
- Run Server
The default port is set to localhost:8080.
npm run dev
The following is a rough breakdown for the server side of the application.
For a better understanding of the existing schema, please look at the schema file located at ./niidl-server/prisma/schema.prisma. Documentation for can be found on their site.
For this project, we make use of several APIs including [![Firebase][firebase]][firebase-url] and GitHub.
[![Firebase][firebase]][firebase-url] is used for authentication via GitHub exclusively. Using it's framework, we handle user sign in and keep user data secure. Because we create our own session tokens via Crypto by we query for Firebase for the following:
- UID
- Email These are then used in the query to the GitHub API to ensure we are accessing the correct user. As Username and Photo can be changed at any point, those are updated each time a user logs in, while the rest remain constant.
The documentation for GitHub's API is extensive and is utilized throughout the build. It is used to get information including the following:
- User Info
- Username
- GitHub Photo
- Repository Info
- Repo Name
- Repo Issues
- Repo Code
The usage for this resource as stated above is to create an place for coders to collaborate on projects with a more robust search function and better filtering. As GitHub primarily filters off languages and keywords, this tends to leave much to be desired when looking for a project that resonates with engineers looking to help others. We also wanted a place where relatively inexperienced coders would have the opportunity to offer their skills without feeling judged. We know how high the perceived barrier to entry can be for working on "major projects" and wanted to make that feel more accessible.
- Broader search via GitHub API
- Incorporate opensource projects
- Limit functionality to promote project creation through niidl
- Secure authentication via Firebase
- Cookie utilization
- User Features
- Built out user dashboard
- Discussion Features
- Sub pages to allow for navigation through
- Add tabs including new ideas, pinned threads, most popular
- Allow for upvoting of comments/threads
- Edit/Delete comments/threads
- All comments/threads have markdown capability
- UI/UX
- Redirect to Thread/Project on creation
- Cover message box with login/signup display if not logged in
- Search bar with past history
- Cookie Modal on first login
- Split tags into categories (language/descriptors)
- Validate GitHub owner so users can only upload their own projects
- Add profile pictures to messages
- Loading animation for transitions
- Allow for markdown to include inline code
- Multi-language Support
- Further user dashboard personalization
- Continue refinement of project categorization and filtering
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
- Takuya Stern - @TrenchTemplar - [email protected]
- Kaire Montenegro - @Kai-Animator - [email protected]
- Hideki Fabio Hirose - @fabiohidekihirose - [email protected]
- Adrian Ang - @adrianang - [email protected]
- Bryan Cendales - @MrBCendales - [email protected]
It's impossible to add every single resource that helped to make this possible, but below you will find a few.