Ecnoniqq is your personal passport to the planet's price tags. It's not just a web app; it's a whisperer for your wallet. Real-time data, tailor-made recommendations, and a community of kindred travelers make Econiqq your go-to guide for worldly adventures without the financial fuss.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.js
. The page auto-updates as you edit the file.
Clone the project
git clone https://github.com/Adam014/Econiqq.git
Go to the project directory
cd Econiqq
Install dependencies
npm install
Start the server
npm run dev
Color | Hex |
---|---|
Background_color | #000000 |
Button_color | #F13E51 |
Hover_color | #E08C9C |
To run this project, you will need to add the following environment variables to your .env file
NEXT_PUBLIC_RAPIDAPID_KEY = your_RAPIDAPI_key
NEXT_PUBLIC_SUPABASE_ANON_KEY = your_SUPABASE_key
NEXT_PUBLIC_SUPABASE_APP_URL = your_SUPABASE_url
GET /map/${country}/${capital}
The fetchData
function is responsible for fetching data from the Supabase database. It first checks if the data exists in Supabase by querying the CountryAndCapitalCollection
table. If the data is found, it is returned. If the data is not found, the function calls the fetchCostOfLiving
function to fetch the data from an external API. The fetched data is then saved to Supabase and returned.
const data = await fetchData('USA', 'Washington');
console.log(data);
// Output: The fetched data from Supabase or the external API
decodedCountry
(string): The decoded country name.decodedCapital
(string): The decoded capital name.
- The function queries the
CountryAndCapitalCollection
table in Supabase to check if the data exists for the given country and capital. - If the data is found, it is returned.
- If the data is not found, the function calls the
fetchCostOfLiving
function to fetch the data from an external API. - The fetched data is then saved to Supabase using the
upsert
method. - If the data is successfully saved, it is returned.
- If any errors occur during the process, appropriate error messages are thrown.
- The fetched data from Supabase or the external API.
It also works, when u type:
GET /map/${country}/${another_city_you_can_think_of}
- @kindast - Fullstack Developer
Client: Next.js (both Typescript and Javascript for the map), TailwindCSS, Jest
Database: Supabase
Contributions are always welcome!
For support, email adam.stadnik@seznam.cz or contact me via the web!
If you have any feedback, please reach out to me at adam.stadnik@seznam.cz