Table of Contents
Podopieczni.pl is a comprehensive web application designed to facilitate animal adoption and manage shelter data in Poland. The platform integrates promotional features with management tools to provide a seamless experience for both prospective pet owners and animal shelters.
- User-Friendly Interface: Intuitive design for both potential adopters and shelter administrators.
- Advanced Search: Filter and search for animals based on various criteria.
- Shelter Management: Tools for shelters to manage their animals and adoptive processes.
- Multi-Language Support: Accessible in multiple languages to cater to a diverse audience.
- Responsive Design: Optimized for use on various devices, including desktops, tablets, and smartphones.
- Security and Privacy: Implemented measures to protect user data and ensure privacy.
The project was conceived to address the gap in efficient and user-friendly platforms for animal adoption. Traditional methods often lacked integration and modern features, leading to delays and inefficiencies in the adoption process. Podopieczni.pl aims to streamline this process and enhance the experience for all involved.
- Improve Adoption Rates: Provide a more effective and engaging platform for potential adopters.
- Streamline Shelter Operations: Offer shelters tools to manage their operations efficiently.
- Increase Accessibility: Ensure that the platform is accessible to a broad audience with various needs.
- Promote Animal Welfare: Support the mission of animal shelters and rescue organizations by improving visibility and adoption opportunities.
The project leverages modern web technologies to deliver a high-quality user experience:
- Frontend: Built with React.js and styled using TailwindCSS. The UI components are designed using ShadCN UI, a powerful design system that provides a set of fully customizable, accessible components.
- Backend: Utilizes Next.js and tRPC for robust server-side operations.
- Database: Managed with Prisma and PostgreSQL on Neon, offering a reliable and scalable database solution.
- Deployment and CI/CD: The application is deployed and managed through Vercel, ensuring reliable performance and scalability.
- Continuous Integration: Automated workflows for code quality checks, testing, and other pull request actions are handled using GitHub Actions.
Welcome to Podopieczni.pl! This guide will help you set up your local development environment and get the application running on your machine.
Before you start, make sure you have the following software installed:
- Node.js: Version 18 or higher. Node.js provides the runtime environment for running JavaScript on the server side.
- Download from Node.js official website.
- npm (Node Package Manager): Comes bundled with Node.js. It is used for managing the project's dependencies.
- Git: For version control and managing the source code repository.
- Download from Git official website.
- PostgreSQL: The database used for storing application data.
- Download and install from PostgreSQL official website.
- Prisma CLI: Ensure you have the Prisma CLI installed. You can install it globally using npm if you don't already have it:
npm install -g prisma
Additional tools (optional but recommended):
- Docker: For containerizing the application and its dependencies.
- Download from Docker official website.
- Vercel CLI: For managing deployments if you wish to deploy locally.
- Install via npm:
npm install -g vercel
- Install via npm:
Make sure your PostgreSQL server is running. You can start it using your system’s service manager or PostgreSQL’s control commands.
Open a terminal and connect to PostgreSQL to create a new database:
psql -U postgres
Then, create a new database (replace mydatabase with your desired database name):
CREATE DATABASE mydatabase;
Exit the PostgreSQL shell:
\q
Alternatively, you can use a GUI tool like pgAdmin to create a new database.
If you prefer to not host a database locally on your machine you can use Docker to run a PostgreSQL container:
docker run --name podopieczni-postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres
or create a serverless database on Neon and use the connection string provided in the dashboard of your database.
Follow these steps to set up the project locally:
-
Clone the Repository
Clone the repository to your local machine using Git:
git clone https://github.com/21142/podopieczni.git
-
Navigate into the Project Directory
Change into the project directory (assuming you have cloned the repository into a folder named
podopieczni
):cd podopieczni
-
Install Dependencies
Install the necessary dependencies using npm:
npm install
-
Set Up Environment Variables
Create a .env file in the root directory of the project. Use the provided .env.example as a template:
cp .env.example .env
Edit the .env file with your database credentials and other environment-specific variables. Ensure you provide the correct values for:
- DATABASE_URL (PostgreSQL connection string)
- GOOGLE_ID (Google OAuth Client ID)
- GOOGLE_SECRET (Google OAuth Client Secret)
- EMAIL_FROM (Sender email address)
- EMAIL_SERVER_USER (Email server username)
- EMAIL_SERVER_PASSWORD (Email server password)
- EMAIL_SERVER_HOST (Email server host)
- EMAIL_SERVER_PORT (Email server port)
- UPLOADTHING_SECRET (UploadThing secret key)
- UPLOADTHING_APP_ID (UploadThing application ID)
- NEXTAUTH_SECRET (NextAuth secret key, required in production)
- NEXTAUTH_URL (NextAuth URL)
The environment variable requirements and their constraints are defined using zod in theenv.mjs
file. This file uses the@t3-oss/env-nextjs
package to ensure the configuration values meet the necessary criteria for proper application functionality.
-
Run the Database Migrations
Apply the database migrations to set up the schema:
npx prisma migrate dev
Once you have completed the setup and installation, you can start using the application by following these steps:
To run the application locally, start the development server:
npm run dev
The application will be accessible at http://localhost:3000.
To ensure the application is functioning correctly, you can run unit tests locally. To execute unit tests using Vitest, run the following command:
npm run test
To run end-to-end tests using Playwright, execute the following command:
npm run e2e
or if you want to run them with UI for better visualization, run the following command:
npm run e2e:ui
Distributed under the MIT License. See LICENSE
for more information.
Hi, I'm Maciej, a developer of podopieczni. Below I've listed ways to contact me.
Link to my github profile
I would like to acknowledge my own efforts in developing this project. This application was created solely by me, and I am proud of the work accomplished.
Thank you to everyone who has supported and encouraged me throughout this process. Your support has been invaluable.