Before you begin, ensure you have the following installed on your system:
Ensure you have environment variables set up for development by creating a
.env
file.
The project is divided into two main parts:
-
Frontend (located in the
frontend
directory):- Built using React Native + Expo.
- Cross-platform support for iOS, Android, and web.
-
Backend (located in the
backend
directory):- Built using Node.js + Express.
- MongoDB for database operations.
- Supabase for authentication.
git clone https://github.com/your-repo/snapper.git
cd snapper
We use Taskfile to streamline setting up the project.
task install
This command will install dependencies for both frontend and backend.
Create a .env in the root directory containing the following:
NODE_ENV=development
SERVER_PORT=3000
You can start the frontend and backend simultaneously by running:
docker compose up
task start
Or, you can start each service separately:
- Frontend (React Native):
task frontend:start
- Backend (Express):
task backend:start
For development, where you may want auto-reload features:
task backend:dev
To run the backend tests, use:
task backend:test
We use Jest for testing the backend.
Here’s an overview of the important backend routes:
Auth Routes: POST /auth/register: Register a new user.
POST /auth/login: Log in an existing user.
POST /auth/logout: Log out the user.
Healthcheck:
GET /ping: Check server status, requires authentication.
Please make sure to create a new branch for every feature you work on, and always create a pull request for code review. Ensure that all tests pass locally before submitting your PR.
EXPO_NO_KEYCHAIN=1 eas build -p ios --profile production --auto-submit
If you run into any problems, feel free to slack me!
Happy coding! 🐠