This repository contains the implementation of a functional coffee subscription website, created according to the design guidelines provided in the Frontend Mentor challenge. The project was developed using the Astro framework and is fully responsive, adapting to any screen size.
- Technologies Used
- Deploy on Vercel
- Getting Started
- Project Structure
- Using Astro
- Code Formatting
- Want to learn more?
- Author
- HTML
- JavaScript
- Tailwind CSS
- Astro
- TypeScript
- EsLint
- Prettier
Follow the steps below to set up and run the project on your local environment:
-
Clone this repository:
git clone https://github.com/joaom00/coffeeroasters.git
-
Navigate to the project directory:
cd coffeeroasters
-
Install dependencies using one of the following package managers (choose one):
npm install yarn install pnpm install
-
After installing dependencies, start the project:
npm start yarn start pnpm start
The site will be available at http://localhost:4321.
This project is deployed on Vercel. You can access the live site at Vercel deploy.
Inside your Astro project, you'll see the following folders and files:
/
├── public/
├── src/
│ ├── assets/
│ ├── components/
│ ├── layouts/
│ └── pages/
└── package.json
Astro looks for .astro or .md files in the src/pages/ directory. Each page is exposed as a route based on its file name.
There's nothing special about src/components/, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
Any static assets, like images, can be placed in the public/ directory.
This project was built using the Astro framework. If you're new to Astro and want to learn more about how to use it, follow these steps:
-
Install Astro globally (if you haven't already):
npm install -g astro
-
Create a new Astro project using the basics template:
npm create astro@latest -- --template basics
-
Start your Astro project locally:
npm run dev
Your Astro project will be available at http://localhost:3000.
-
To build your production site, run:
npm run build
-
For more information and advanced usage of Astro, refer to the Astro documentation.
We use Prettier and ESLint for code formatting in this project to ensure consistent and clean code. You can format your code using the following commands:
-
Format all JavaScript and TypeScript files:
npm run format
-
Check for code formatting issues:
npm run lint
During this project, I learned how to work with a new framework called Astro. Additionally, I gained experience in managing images using the features provided by the Astro framework. It was a valuable learning experience that expanded my skillset as a developer.
I also learned how to optimize images using art direction, which allowed me to deliver a better user experience by serving different image versions based on the user's device and screen size.
- GitHub: João Pedro Magalhães
- Email: joaom00.dev@gmail.com
- Website: Portfolio