Dev Academy
Get the free Pills
  • Articles
  • Podcast
  • Web Security
  • About
  • Get the free Pills

For JavaScript & TypeScript developers

Build web applications you can trust.

Get two practical Knowledge Pills every week to help you review, secure, and test code written by you, your team, or AI.

Tuesday Security Friday Testing

    Free. Double opt-in. Check your inbox to confirm. Unsubscribe anytime. Privacy policy.

    900+ course enrollments across Web Security & Full-stack Testing

    Security Tuesday 3 min read

    Can another website frame your app?

    An invisible iframe can turn a user's click into an authenticated action.

    Content-Security-Policy: frame-ancestors 'none';
    Testing Friday 4 min read

    Can we test application architecture?

    Stop a clean dependency graph becoming a big ball of mud.

    controllers should not depend on APIs

    See what arrives in your inbox

    One useful idea. 💡
    Under five minutes.

    Every Pill stands on its own. No backlog and no course to finish - just a practical lesson you can use when the situation appears in your work.

    Security Tuesday · example email

    BP

    Bartosz from Dev Academy

    Can another website click your buttons?

    3 min read

    Hi developer,

    Imagine a user visits an attacker-controlled page while signed in to your application. The attacker places your app inside a transparent iframe over a harmless-looking button.

    The click lands inside your application

    If the framed page has an authenticated session, the browser delivers the user's click to the real button inside your app.

    <iframe src="https://your-app.com/account"
            class="invisible-overlay"></iframe>
    • The user sees the attacker's interface, not the framed page.
    • The click can trigger a real state-changing action in your app.
    • Authentication alone does not prove that the user intended the action.
    Control who can frame your application

    Return a Content Security Policy header with frame-ancestors. Use 'none' when your application should never be embedded.

    Content-Security-Policy: frame-ancestors 'none';

    The browser now refuses to render your application inside an attacker-controlled frame, preventing the clickjacking setup.

    Stay curious, Bartosz

    Testing Friday · example email

    BP

    Bartosz from Dev Academy

    How to test ARCHITECTURE?

    4 min read

    Hi developer,

    In a layered application, controllers should depend on services and services should depend on repositories.

    Architecture deteriorates silently

    Without an automated boundary, a clean dependency graph can slowly become a big ball of mud.

    controllers -> services -> repositories
    • A controller imports an API file directly.
    • Reviewers miss the dependency in a large pull request.
    • The exception becomes the next developer's precedent.
    Restrict the dependencies with testing

    In TypeScript, TSArch can fail the build when a controller crosses the boundary.

    describe("Application", () => {
      it("controllers should not depend on APIs", async () => {
        const rule = filesOfProject()
          .matchingPattern(".*controller\\.ts")
          .shouldNot()
          .dependOnFiles()
          .matchingPattern(".*api\\.ts");
    
        await expect(rule).toPassAsync();
      });
    });

    The test turns an architectural intention into an executable rule.

    See you next Friday, Bartosz

    Want the next Pill in your inbox?

      Free. Double opt-in. Check your inbox to confirm. Unsubscribe anytime. Privacy policy.

      Why this matters now

      Code gets produced faster. Judgment doesn't.

      AI can generate features, security headers, and tests. You still need to recognize broken trust boundaries, missing authorization, weak assertions, and tests that pass without proving useful behavior.

      Dev Academy trains the judgment behind the code - one focused Pill at a time.

      Proven teaching experience

      900+ course enrollments

      Real feedback from developers who joined previous Dev Academy programs.

      ★★★★★

      This is without a doubt one of the most comprehensive course I have taken on advanced web security. Bartosz's ability to explain the theory with live examples shows he is extremely knowledgeable in the topics being taught and he has tons of hours of work and effort put into research and making these contents as understandable as possible.

      Hassan A Mohamed One of the Most Comprehensive Courses on Advanced Web Security From a previous Web Security Academy program · March 2021
      ★★★★★

      I learnt a lot from the course, personally I feel that the experience and the best practices for the web security is crucial, also the amount of information laid down in a concise manner was impressive, thank you for this amazing course.

      Ishan Soni Best and Useful course ever. From a previous Web Security Academy program · August 2022
      Bartosz Pietrucha, founder of Dev Academy

      Dev Academy by Bartosz Pietrucha

      Practical teaching for people who ship real software.

      Building production software since 2013. Teaching developers since 2017.

      I created Dev Academy to make difficult engineering decisions clear, practical, and useful at work. Every Pill starts with a situation a developer can recognize and ends with something concrete to apply.

      Your first Security Pill arrives immediately

      Two useful ideas every week. Less than ten minutes total.

      Security Tuesday. Testing Friday. Free for JavaScript and TypeScript developers.

        Free. Double opt-in. Check your inbox to confirm. Unsubscribe anytime. Privacy policy.

        Dev Academy

        Dev Academy by Bartosz Pietrucha

        Practical Security and Testing Knowledge Pills for JavaScript and TypeScript developers.

        Explore

        • Articles
        • Podcast
        • Web Security
        • About

        Connect

        • LinkedIn
        • bartosz.io
        2026 Dev-Academy.com
        • Terms and Conditions
        • Privacy policy