Taskr is a task management application designed to help you organize, prioritize, and collaborate on your projects seamlessly. Whether you're working solo or as part of a team, Taskr provides the tools you need to stay productive and efficient. This project was developed with a focus on Java Spring Boot studies. Therefore, the Front End may not be fully implemented.
- RESTful API π‘: Robust and scalable API built with Spring Boot.
- Authentication & Authorization π: Secure user authentication using JWT.
- Real-time Updates β‘: WebSocket support for instant notification updates.
- Database Integration ποΈ: Support for PostgreSQL and H2 databases.
- API Documentation π: Comprehensive API docs with Swagger.
- Responsive UI π±: Built with Next.js and Tailwind CSS for a responsive design.
- Real-time Communication π¬: Integration with WebSockets for live notification updates.
- Authentication π: Secure login and signup with NextAuth.
- State Management π: Efficient state handling with React hooks and context.
- Iconography π¨: Enhanced UI with React Icons.
The frontend of MediManage is built using modern technologies to ensure a responsive and seamless user experience.
- Next.js (
next
): A React framework for server-rendered applications. - React (
react
,react-dom
): A JavaScript library for building user interfaces. - Tailwind CSS (
tailwindcss
,@tailwindcss/forms
,@tailwindcss/typography
): A utility-first CSS framework for rapid UI development. - NextAuth.js (
next-auth
): Authentication for Next.js applications. - Zod (
zod
): A TypeScript-first schema validation library. - React Icons (
react-icons
): Include popular icons in your React projects easily.
The backend leverages the power of Spring Boot to provide a scalable and secure foundation for the application.
- Spring Boot Starter Web (
spring-boot-starter-web
): Build web applications, including RESTful services. - Spring Boot Starter Data JPA (
spring-boot-starter-data-jpa
): Simplify data persistence with JPA. - Spring Boot Starter Security (
spring-boot-starter-security
): Secure the application with Spring Security. - Spring Boot Starter Validation (
spring-boot-starter-validation
): Provide validation support. - Spring Boot Starter Websocket (
spring-boot-starter-websocket
): Enables real-time, bidirectional communication. - PostgreSQL Driver (
postgresql
): Connect to PostgreSQL databases. - H2 Database (
h2
): An in-memory database for development and testing. - Java JWT (
java-jwt
): JSON Web Token (JWT) creation and verification. - ModelMapper (
modelmapper
): Simplify object mapping. - Lombok (
lombok
): Reduce boilerplate code with annotations. - SpringDoc OpenAPI (
springdoc-openapi-starter-webmvc-ui
,springdoc-openapi-starter-webflux-ui
): Generate API documentation. - Spring Boot DevTools (
spring-boot-devtools
): Enhance the development experience with automatic restarts.
-
Frontend:
-
Backend:
- Docker and Docker Compose
git clone https://github.com/Barata-Ribeiro/Taskr.git
cd Taskr
-
Install Dependencies
Using npm:
npm install
Or using Yarn:
yarn install
-
Configure Environment Variables
Create a
.env.local
file in theclient
directory and add the necessary environment variables:AUTH_SECRET=AUTO_GEN_AUTH_JS_KEY # Added by npx auth. Read more: https://cli.authjs.dev AUTH_URL=BACKEND_AUTH_URL AUTH_TRUST_HOST=TRUE_OR_URLS NEXT_PUBLIC_BASE_URL=FRONT_END_ORIGIN_URL
-
Run the Development Server
npm run dev
The application will be available at http://localhost:3000.
-
Build for Production
npm run build npm start
-
Navigate to the Server Directory
cd MediManage/server
-
Adjust the
docker-compose.yml
Update the file with the necessary environment variables and/or configuration changes for running the backend.
-
Adjust
Dockerfile
Update the
Dockerfile
with any necessary changes for the backend. -
Configure Environment Variables
Ensure the following environment variables are set in the
docker-compose.yml
under thetaskr-backend
service:environment: DB_ORIGIN: taskr-database DB_PORT: 5432 DB_NAME: taskr_db DB_USER: postgres DB_PASSWORD: postgres JWT_SECRET: secret CORS_ORIGINS: http://localhost:3000
Additional Environment Variables:
ADMIN_DISPLAY_NAME=YOUR_DISPLAY_NAME ADMIN_EMAIL=contact@example.com ADMIN_FIRST_NAME=YOUR_FIRST_NAME ADMIN_LAST_NAME=YOUR_LAST_NAME ADMIN_PASSWORD=YOUR_PASSWORD ADMIN_USERNAME=YOUR_USERNAME
-
Run the Services
From the
server
directory, run:docker-compose up --build
This command will build the backend application and start both the PostgreSQL database and the backend service. The backend will be accessible at http://localhost:8080.
server/
βββ src/
β βββ main/
β β βββ java/com/barataribeiro/taskr/
β β β βββ builder/
β β β βββ config/
β β β βββ controllers/
β β β βββ dtos/
β β β βββ exceptions/
β β β βββ models/
β β β βββ repositories/
β β β βββ services/
β β β βββ utils/
β β βββ ServerSpringbootApplication.java
β βββ test/
βββ .gitignore
βββ docker-compose.yml
βββ Dockerfile
βββ mvnw
βββ mvnw.cmd
βββ pom.xml
βββ taskr.iml
client/
βββ public/
βββ src/
β βββ actions/
β βββ app/
β βββ components/
β βββ hooks/
β βββ interfaces/
β βββ providers/
β βββ utils/
β βββ auth.ts
β βββ middleware.ts
βββ .env.local
βββ .eslintrc.json
βββ .gitignore
βββ .prettierrc
βββ next.config.mjs
βββ next-env.d.ts
βββ package.json
βββ package-lock.json
βββ postcss.config.mjs
βββ README.md
βββ tailwind.config.ts
βββ tsconfig.json
AUTH_SECRET=SECRET_KEY
AUTH_URL=BACKEND_AUTH_URL
AUTH_TRUST_HOST=TRUE_OR_URLS
NEXT_PUBLIC_BASE_URL=FRONT_END_ORIGIN_URL
spring.application.name=taskr
springdoc.api-docs.path=/api-docs
spring.threads.virtual.enabled=true
# Database Configuration
spring.datasource.url=jdbc:h2:file:~/data/taskr_db_test
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.h2.console.enabled=true
spring.h2.console.path=/h2-console
# Hibernate
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
# Security and seed
api.security.token.secret=${JWT_SECRET}
api.security.cors.origins=${CORS_ORIGINS}
api.security.seeder.admin.username=${ADMIN_USERNAME}
api.security.seeder.admin.displayName=${ADMIN_DISPLAY_NAME}
api.security.seeder.admin.firstName=${ADMIN_FIRST_NAME}
api.security.seeder.admin.lastName=${ADMIN_LAST_NAME}
api.security.seeder.admin.email=${ADMIN_EMAIL}
api.security.seeder.admin.password=${ADMIN_PASSWORD}
# Spring Docs
springdoc.swagger-ui.operationsSorter=alpha
springdoc.swagger-ui.tagsSorter=alpha
spring.application.name=taskr
springdoc.api-docs.path=/api-docs
spring.threads.virtual.enabled=true
# Database Configuration
spring.datasource.url=jdbc:postgresql://${DB_ORIGIN:localhost}:${DB_PORT:5432}/${DB_NAME:taskr_db}
spring.datasource.username=${DB_USER:postgres}
spring.datasource.password=${DB_PASSWORD:postgres}
spring.datasource.driver-class-name=org.postgresql.Driver
# Hibernate
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
# Security and seed
api.security.token.secret=${JWT_SECRET}
api.security.cors.origins=${CORS_ORIGINS}
api.security.seeder.admin.username=${ADMIN_USERNAME}
api.security.seeder.admin.displayName=${ADMIN_DISPLAY_NAME}
api.security.seeder.admin.firstName=${ADMIN_FIRST_NAME}
api.security.seeder.admin.lastName=${ADMIN_LAST_NAME}
api.security.seeder.admin.email=${ADMIN_EMAIL}
api.security.seeder.admin.password=${ADMIN_PASSWORD}
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is free software available under the GPLv3 license.