This is a Next.js project bootstrapped with create-next-app
. This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
- Node.js (versions 18 or higher)
- Npm
Fork/clone the repository, install its dependencies and run the local dev server on the root directory:
git clone https://github.com/LinkTheCoder/SpaceOutCat.git
cd SpaceOutCat
npm install
npm run dev
You can now access http://localhost:3000 on your browser.
You can start editing the page by modifying app/page.js
. The page auto-updates as you edit the file.
This project has ci/cd.yml & playwright.yml that are executed on push & pull request.
ci/cd.yml Installs, Load environment variables, Builds & Runs Unit/Integration Tests
playwright.yml Runs the e2e test
Actions secrets and variables Is available in the repository inside the section secrets and variables then Actions.
This is one option to be able to use variables trough Github Actions.
This project use Firebase as real time database.
To learn about how to setup Firebase check out tutorials or their docs: Firebase Documentation
For local development create a .env
file on the root of your project called .env.local
file with your Firebase API key:
NEXT_PUBLIC_FIREBASE_API_KEY=YourKey
For production save your key in a server.
Vercel for example has Environment Variables
available to save keys. You can read more in their docs: Vercel Documentation
Once you have created a Firebase project you will receive several id's and web links that needs to be added to the Firebase config file in the project to be able connect with the database.
apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY,
authDomain: 'project.domain.com',
projectId: 'ID',
storageBucket: 'project.domain.com',
messagingSenderId: 'MS ID',
appId: 'APP ID',
measurementId: 'M ID',
};
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
For styling Tailwind CSS
is used.
Theme extension for colors, font, plugins and more can be found in tailwind.config.js
.
In this project Tailwind form
plugin is added.
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./app/**/*.{js,ts,jsx,tsx,mdx}",
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
// Or if using `src` directory:
"./src/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
colors: {
primary: '#ba68c8',
secondary: '#171717'
}
},
fontFamily: {
sans: ['Montserrat', 'sans-serif'],
}
},
plugins: [require("@tailwindcss/forms")],
}
This project has installed React Testing Library
, Vitest
& Playwright
Run all tests in the test
folder
npm run test
For tutorial how to use Playwright visit their docs: Playwright Documentation
npx playwright test
npx playwright show-report
npx playwright test --ui
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.