Skip to content

πŸ₯‡ Principled Innovation Hackathon Winner: Mine Alliance - Reinventing a sustainable future for Arizona Mining Industry with AI

License

Notifications You must be signed in to change notification settings

LuaanNguyen/Mine-Alliance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

86 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mine Alliance - Reinventing a sustainable future for Arizona Mining Industry with AI πŸš€

An innovative, AI-driven application designed to unite stakeholders across Arizona's mining industry, promoting responsible and sustainable practices.

Mine Alliance

Inspiration ✨

Once we learned that the majority of mining sites were on Indigenous land, some of it sacred land, and that the local communities had no power to raise objections or even to aquire information on the mines affecting their area. We felt motivated to give local communities the power of free information and a voice that was on equal footing with major mining companies and state and federal regulators, so that they could be a part in the process of mining minerals that are essential to human society.

What it does ⛏️

Our website allows the three major stakeholders to log-in either as a community member, mining site representative, or government regulator. Where then, the individual can see information on nearby active mines including tenure; effect radius of the mine; water, soil, and air quality; biodiversity impact; socioeconomic impact; and a description of the mine. Depending on who's logged-in different options will be available. Community members can submit issues that they find with specific mining sites, whether it is an ecological issue or a disruption to sacred lands. Government regulators can submit new site specific regulations, giving a title to the new regulation and a description of the regulation. Mining site representatives can respond to feedback given on their mining sites and submit announcements that can be seen by everyone.

How we build it πŸ‘·

Archtecture

Front-end

  • NextJS for SEO optimization and server-side rendering
  • TailwindCSS for utility-first styling
  • Shadcn for modern UI components and design system
  • Framermotion for smooth, modern website animations
  • Leaflet for interactive map and geospatial visualizations
  • Vercel for seamless deployment and front-end hosting
  • Lucide for modern icons

Back-end & DevOps

  • Flask for handling HTTP requests and API development
  • SQLAlchemy for robust database management and ORM
  • AWS EC2 for scalable and flexible cloud computing infrastructure
  • Amazon SageMaker Studio for builidng, training, and deploying geologically intelligent model
  • ChatGPT-4 API intergration for advanced NLP

Challenges we ran into πŸš’

  • Collecting enough data: Some mining data were confidential to the public.
  • Communication Issue between members: this is our first hackathon together.
  • AWS Credit Time limit: We weren't able to fully fine-tune our own AI model due to a limited AWS credit.
  • Cross-origin hosting: While hosting both client and server on AWS EC2, we ran into the deployment problem due to hosts unable to recognize/ fetch data on the same origin. It turned out to be NextJS environment variables' imcompatibility with AWS hosting.

Accomplishments that we're proud of πŸ‘

We spent a lot of time researching what specific information to show that would be relevant for our stakeholders and what goes into creating an impact assessment.

How to run the program πŸ’»

Make sure you have latest NodeJS, Pip, npm, and Python installed.

Client - Running on http://127.0.0.1:3000

> cd client
> npm i #install all dependencies if this is the first time you are doing this
> npm ci (optional)
> npm run build (for production)
> npm run dev

Server - Running on http://127.0.0.1:5000

> cd server
> python3 -m venv venv
> source venv/bin/activate
> pip install  -r requirements.txt
> python3 db_init.py (If you don't have the data already)
> python3 app.py

Envrionments variables 🀐

Create a .env files in both client and server

In Client, you need Stadia Map's API key and backend url depending on your production needs:

  • STADIA_MAPS_API_KEY=YOUR_KEY
  • BACKEND_URL=YOUR_HOST

In Server, you need OpenAI's API:

  • OPENAI_API_KEY=YOUR_KEY

πŸͺͺ License

Mine Alliance is licensed under MIT License. All development is currently maintain by Luan Nguyen.

About

πŸ₯‡ Principled Innovation Hackathon Winner: Mine Alliance - Reinventing a sustainable future for Arizona Mining Industry with AI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •