A simple authenticated forum, developed with a focus on studying and practicing modern web development concepts.
secspace is an educational project whose goal is to consolidate knowledge in software architecture, containers, and development best practices. It is not intended to be a final product, but rather a conscious and structured experimentation environment.
Throughout the project, fundamental concepts are applied that frequently appear in real-world medium and large-scale applications.
- Simple container orchestration with Docker and docker-compose
- Client-server architecture
- Layered architecture:
- Controllers
- Services (and adapters when necessary)
- Repositories
- Principles and best practices of:
- Clean Code
- Clean Architecture
- SOLID
- Authentication via OAuth2 (Google)
- Implement caching using Redis
- Adopt event-driven architecture to reduce aggressive
GETrequest polling - Improve interface styling
Do not run pnpm install on the host.
If this command (or a similar one) is executed by mistake on the host, remember to remove all generated artifacts, such as:
node_modules.next- any other directories created at the project root (
secspace)
These dependencies must be installed exclusively inside the containers.
- Docker
- Docker Compose
- cloudflared
- Start the Docker daemon:
sudo dockerd- Expose the local service using Cloudflare Tunnel:
sudo cloudflared --url http://127.0.0.1:80- Copy the link provided by
cloudflaredand configure the.envfile, replacing the default API links:
GOOGLE_CALLBACK_URL=https://cloudflaredlinkexemplo.com/api/auth/login/google/callback
NEXT_PUBLIC_API_URL=https://cloudflaredlinkexemplo.com/api- Configure your Google API credentials:
GOOGLE_CLIENT_ID=exemplo.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=SenhaSuperForte- In the Google Cloud Console, register the same links defined in:
NEXT_PUBLIC_API_URLGOOGLE_CALLBACK_URL
These links must be added to the authorized URLs fields to allow the Google OAuth2 screen to be displayed correctly after redirection.
- Start the application with Docker Compose:
sudo docker-compose up --buildThis project prioritizes architectural clarity and understanding of the application's internal flows, even if this results in more verbose solutions than strictly necessary for a small project. The idea is to study consciously, not just to “make it work”.
For more details, see docs
MIT License – see LICENSE for details.
