MongoDB Atlas Hackathon 2022 on DEV
Tags: atlashackathon22
Published: 2022-12-07 05:14:14

## HEY SPACE LOVERS!!
### Welcome to encycloverse the perfect place to find everything about the universe. 

## What I built

I used a mongo Atlas Search to build a space library or how i enjoy call it *encycloverse*. There you can search for one specific thing in the universe, like planets, galaxies, astronomical events and more categories.
Also you can join to the discussion to share something about each planet, galaxy, etc.

### Category Submission:

**Search No More:** Build an application with full-text search capabilities using MongoDB Atlas and Atlas Search

### App Link

You can watch it here -> https://delightful-smoke-038cf9010.2.azurestaticapps.net/universe
### Screenshots
*Autocomplete Search*
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jcxrvjidsp43z369hhih.png)

*Search by category*
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5hsz0ahbbn56p9c3irk9.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e5vxzm6o8xh56utfk4yu.png)

*Design*: https://www.figma.com/file/JZSAeFd70tomEienvjLFL8/mongodb-hackatlon-proyect?node-id=0%3A1&t=uPGKla5YcIrCARW3-0

### Description
 
In the main page (Search) you can search by text anything you want to find, don't worry if you don't have idea what looking for just write more than one letter and the autocomplete search will helps you.
For this to work I implemented the autocomplete feature.

Also you can search by category only in categories page. You need only pick one or more categories and apply changes.
When you pick any space object like *mars* planet you can go into their page and post one comment to share anything with other about that specific item, you only need an account. Don't worry is secure and fast.

You can sign up to get access to comment any item the you only need a user name and password. The password is hashed in the server before they are saved.

### Link to Source Code

https://github.com/AlexChavezz/mongoDB_HACKATHON_proyect

### Permissive License


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/07u0qzywsake959s9yln.png)

https://github.com/AlexChavezz/mongoDB_HACKATHON_proyect/blob/main/LICENSE.md

## Background
(What made you decide to build this particular app? What inspired you?)

I am a complete space lover I enjoying everything about the universe. The best part of development is that isn't necessary follow just one monotonous road to do something, you can put together so many pieces as you want to create amazing things.
That's why I'm decide build this awesome application, one place to learn and share about the huge cosmos.


### How I built it
(How did you utilize MongoDB Atlas? Did you learn something new along the way? Pick up a new skill?)

This application has two parts.

#### Front-end
- React

#### Back-end
- Nodejs
- Nodejs (Express.js)
- To connect Nodejs with mongo atlas I use *mongoDB* official driver for node.js.

On this few weeks I was learn so much. previously I have used mongo atlas but I haven't idea about their features like mongo atlas search available only in mongo atlas. So along this challenge I was learn about it and how implement it in my principal programing language.

I implemented autocomplete search trough **autocomplete** operator inside my **$search** stage to home page works.

To search by categories I used the **compound** operator in the **$search** stage with the purpose to get items that are results of multiple combinations.

In my mongo atlas cluster I have three collections inside my main database. 
**Items**: To save all space objects.
**Comments**: Where are saved all comments posted by users.
**Users**: Here I store the users information. 


### Additional Resources/Info

#### Support Material

- https://learn.mongodb.com/learn/learning-path/mongodb-nodejs-developer-path
- https://www.mongodb.com/docs/atlas/atlas-search/tutorial/compound-query-custom-score/
- https://www.mongodb.com/docs/atlas/atlas-search/operators-and-collectors/